It's more complicated than that. A few of the considerations:
* DNA/RNA are not the only options. Other nucleobases potentially exist and artificial ones have certainly been created (1)
* A completely unique sequence would indicate no shared ancestor even if it was DNA.
* We're not sure how life started on Earth either. It could've been more than once in more than one way. We don't know.
* Earth and Mars shared material as asteroid impacts ejected material that eventually landed on the other. Some microorganisms could potentially survive the journey.