Whoever marries or has nonmarital sexual intercourse, as defined in s. 948.01 (6), with a person he or she knows is a blood relative and such relative is in fact related in a degree within which the marriage of the parties is prohibited by the law of this state is guilty of a Class F felony.