"На двоих cон по крыше" is nonsensical. The "по" is out of place here. It could be, say, "Ходит сон по крыше", then "по" would be okay. Also, it could be "На двоих cон на крыше" (not a perfect...