Tariq bin Shihab (may Allah have mercy on him) narrates that two men became junub (in a state of major ritual impurity). One of them performed tayammum and prayed, while the other did not pray. Then they both came to the Messenger of Allah (peace and blessings be upon him), and he (peace and blessings be upon him) did not find fault with either of them.
Imam al-Nasa'i (may Allah have mercy on him) narrated it with a similar meaning through the chain of Muhammad bin Abd al-A'la, from Umayyah bin Khalid, from Shu'bah, and his wording is: "A man became junub, so he did not pray."
Related hadith on this topic