  The production of two jets is the simplest exclusive quantum chromodynamics
process in electron-positron annihilation. Using this process, we examine the
structure of next-to-next-to-leading order (NNLO) corrections to jet production
observables. We derive a subtraction formalism including double real radiation
at tree level and single real radiation at one loop. For two-jet production,
these subtraction terms coincide with the full matrix elements, thus
highlighting the phase space structure of the subtraction procedure. We then
analytically compute the infrared singularities arising from each partonic
channel. For the purely virtual (two-parton) NNLO corrections, these take the
well known form predicted by Catani's infrared factorization formula. We
demonstrate that individual terms in the infrared factorization formula can be
identified with infrared singular terms from three- and four-parton final
states, leaving only single poles and a contribution from the one-loop soft
gluon current, which subsequently cancels between the three- and four-parton
final states. Summing over all different final states, we observe an explicit
cancellation of all infrared poles and recover the known two-loop correction to
the hadronic $R$-ratio.
