State tax filing

Okay thank you! My New York wages in line 16 is my full wages and salary for the whole year. Where line 16 for NJ is I assume just the amount I made as a NJ resident. When filing for state do I have to subtract the whole year salary listed in line 16 for NY from NJ to be able to say how much I made when I lived in NY or since I work in NY I keep the whole amount.  

Same question  goes for federal. When I have to fill in the information on line 15-20 for both states do I have to do any subtraction to find out how much I made during the months I lived in NY  or just put exactly what is there ( my whole salary).