They lived across from each other and the Sannyasi would throw a pebble into a pile for each time somebody visited her. Soon the pebbles became a small hill and he would tell her "look at the mountain of sins you have committed".
She would pray to God constantly for forgiveness. When they both died, the prostitute went to heaven and the Sannyasi to hell.