Sayyiduna Ali (may Allah be pleased with him) said: "Whatever of the prayer you catch (with the imam) is the first part of your prayer."
(b) A similar report is also transmitted from Sayyiduna Ibn Umar (may Allah be pleased with them both).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3631