solved p1 and p2
solved p1 and p2