Lived in NJ, received W2-G from PA

Lived in NJ, got some gambling winnings (W2-G) from PA. 

Do I have to pay state taxes to PA, NJ or both?