Necessary and sufficient conditions for the two-point phase probability function of two-phase random media