I understand that in a two body problem under central force, corresponding to a potential V(r)(assume one body is massive compared to the other so that its motion is negligible), conservation of angular momentum implies the motion of the body to be in a plane spanned by position r and momentum p vectors. But if we have three bodies, one of them massive, are the motions of other two bodies still restricted to a plane? Now the total angular momentum is L = L1 + L2 = r1 x p1 + r2 x p2, which is conserved. Mathematically, L could be kept constant while L1 and L2 are changing. Which means we could have motions of the two bodies in two planes orthogonal to each other, a non-planar motion. Is this allowed? If not, why? Then, what is reason for the planar motion? In specific why is the solar system flat?