A Fubini theorem for pseudo-Riemannian geodesically equivalent metrics

We generalize the following classical result of Fubini to pseudo-Riemannian metrics: if three essentially different metrics on an (n ≥ 3)-dimensional manifold M share the same unparametrized geodesics, and two of them (say, g and g) are strictly nonproportional (that is, the minimal polynomial of the g-self-adjoint (1, 1)-tensor defined by g coincides with the characteristic polynomial) at least at one point, then they have constant sectional curvature.