Probabilistic manipulation of entangled photons