Whoever has sexual intercourse with another nearer of kin to the actor than first cousin, computed by rules of the civil law, whether of the half or the whole blood, with knowledge of the relationship, is guilty of incest and may be sentenced to imprisonment for not more than ten years.