That depends. As a nonresident, you'll need to file a Massachusetts return if your annual gross Massachusetts income was more than either $8,000 or the prorated personal exemption, whichever is less. New Hampshire only taxes interest and dividend income when it exceeds $2,400 annually ($4,800 for joint filers), so if your interest and dividends are lower than this amount you won't need to file a New Hampshire return. Please see the FAQ below for more information.
Do I need to file a state return?
https://ttlc.intuit.com/replies/4801660