inside outside p1 p2