Tax Year Prior to 2020: Filing state returns in resident state or working state?

I live in NH and work in MA.  in what state do I file my tax returns for?