[Machine] The Messenger of Allah ﷺ said: "When you come and find us in prostration, then prostrate and do not count anything as a prayer. And whoever catches a unit of prayer has caught the entire prayer." This was narrated specifically by Yahya ibn Abi Sulayman al-Madini, and a similar narration with a weaker chain of narrators has been transmitted from Abu Huraira.
قَالَ رَسُولُ اللهِ ﷺ إِذَا جِئْتُمْ وَنَحْنُ سُجُودٌ فَاسْجُدُوا وَلَا تَعُدُّوا شَيْئًا وَمَنْ أَدْرَكَ الرَّكْعَةَ فَقَدْ أَدْرَكَ الصَّلَاةَ تَفَرَّدَ بِهِ يَحْيَى بْنُ أَبِي سُلَيْمَانَ الْمَدِينِيُّ وَقَدْ رُوِيَ بِإِسْنَادٍ آخَرَ أَضْعَفَ مِنْ ذَلِكَ عَنْ أَبِي هُرَيْرَةَ