Filing for multiple states

I have state ID of Massachusetts but last seven months I moved to New Hampshire  by purchasing a Condo but still hold ID of Massachusetts and intend to keep it in future the same ID due to some reasons. Is it possible to file taxes for two states, I am retired now,  I have income of Social Security and some  interest income from banks and as well 401K with some from Vanguard.  

My question is still keeping the ID of MA, can I file for New Hampshire?

How do I file for two states by splitting for some time period?

Thanks.