Ramsey interference in two-photon parameteric scattering