Magnetic order in the pyrochlore iridates A2Ir2O7 (A = Y, Yb)