Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrates this statement of the Noble Prophet (peace and blessings of Allah be upon him): "When a person has doubt regarding his prayer, he should try to estimate the correct situation, then say the salam, and then perform two prostrations of forgetfulness (sajda sahw)."