What determines the longitudinal stability of an airplane?

The location of the CG with respect to the center of lift.