The answer is both, the z axis also needs to be rigid enough to transmit the forces, which will then be transfered to the y axis and will be max at full z travel. This will cause a moment on the y axis, (both directions) so like routercnc said your main concern is the torsional stiffness, beam deflection will mainly be from the weight of the x axis and carriage (static and dynamic) but some uplift could arise if you are plunge routing....

Maybe wait for Irving or routercnc, they are better at explaining than me.