Do I have to file tax in the state I lived partially but did not work in?

Hi. I lived in MD for the beginning of MD, and moved to OH as I started my job there. While preparing the tax, the site reminded me to file MD return. Do I have to file it even though I lived there partially and didn't work in MD at all?