The law stipulates that the crime is punishable by imprisonment for life or any term of years in either the state prison or house of correction. Any second or subsequent offense of statutory rape shall result in a mandatory sentence of 5 years upon conviction.