Section 123. Whoever willfully trespasses upon land or premises belonging to the commonwealth, or to any authority established by the general court for purposes incidental to higher education, appurtenant to a public institution of higher education, any correctional institution of the commonwealth, Tewksbury hospital, Soldiers' Home in Massachusetts, Soldiers' Home in Holyoke, any public institution for the care of mentally ill and developmentally disabled persons, any Massachusetts training school or state charitable institution, or upon land or premises belonging to any county and appurtenant to a jail, house of correction or courthouse, or whoever, after notice from an officer of any of said institutions to leave said land, remains thereon, shall be punished by a fine of not more than fifty dollars or by imprisonment for not more than three months.