Section 4. Whoever, being an inmate of a building and a resident seventeen years of age or upward, refuses or neglects to give the information required by section four of chapter fifty-one when asked by a registrar, assistant registrar, or anyone so authorized under section fourteen A of said chapter fifty-one to perform such duties, or whoever being an owner or an occupant of a building, or a clerk, superintendent, manager, administrator, or other person having in charge the affairs of a hotel, lodging house, public lodging house, multi-dwelling unit, nursing home, or rest home, as referred to in section ten A of said chapter fifty-one refuses or neglects to give the full and true information within his or her knowledge relating to all persons residing in such building, home, or unit, when asked by such registrar or other authorized person, shall be punished by a fine of not more than five hundred dollars or by imprisonment for not more than one year. Whoever, being a licensed innholder, keeper of a lodging house, or public lodging house, keeper or owner of a multi-dwelling unit, or administrator of a nursing home or rest home, fails in any respect to make the reports required by said section ten A of said chapter fifty-one in the detail and manner and within the time therein provided shall be punished by a fine of not less than ten nor more than fifty dollars.