I live in NH, but work in MA. Do I need to file in two states? If so, what version of TurboTax allows mw to file in two states?

I recently bought a condo in NH and received the 1098 form for my mortgage.  However, I work in MA.  I also am holding some stocks and bonds that I have made dividends on and interest on in the past year.  Do I need to file my taxes in both Massachusetts and New Hampshire, or do I only need to file my taxes in one of those states?