They would have had to at the beginning, of course, since there
were so few people on earth. But God later gave Moses a law for the
children of Israel that they were no longer to have such incestuous
relationships. By that time, there were enough people on earth that
one did not have to marry a close relative.
Leviticus 18:6-16 None of you shall approach to any that is near
of kin to him, to uncover their nakedness: I am the LORD.
The nakedness of thy father, or the nakedness of thy mother,
shalt thou not uncover: she is thy mother; thou shalt not uncover
her nakedness.
The nakedness of thy father's wife shalt thou not uncover: it is
thy father's nakedness.
The nakedness of thy sister, the daughter of thy father, or
daughter of thy mother, whether she be born at home, or born
abroad, even their nakedness thou shalt not uncover.
The nakedness of thy son's daughter, or of thy daughter's
daughter, even their nakedness thou shalt not uncover: for theirs
is thine own nakedness.
The nakedness of thy father's wife's daughter, begotten of thy
father, she is thy sister, thou shalt not uncover her
nakedness.
Thou shalt not uncover the nakedness of thy father's sister: she
is thy father's near kinswoman.
Thou shalt not uncover the nakedness of thy mother's sister: for
she is thy mother's near kinswoman.
Thou shalt not uncover the nakedness of thy father's brother,
thou shalt not approach to his wife: she is thine aunt.
Thou shalt not uncover the nakedness of thy daughter in law: she
is thy son's wife; thou shalt not uncover her nakedness.
Thou shalt not uncover the nakedness of thy brother's wife: it
is thy brother's nakedness.