No, it is not necessary to do this. As long as the reactants remain on the left side of the arrow and the products remain on the right side, the compounds can be written in any order, regardless of how many atoms there are in each element.