I lived in NJ for 10 months and in PA for 2 months in 2019. Do I have to file state returns for both states?

I started a full time job in PA and live in PA.