Hadith 1138
Abu Huraira reported God’s Messenger as saying, "Do not try to go ahead of the imam. When he says ‘God is most great’ say ‘God is most great’; when he says ‘Nor of those who err’ (i.e. the end of sura 1) say ‘Amen’; when he bows bow; and when he says ‘God listens to him who praises Him’ say, ‘O God, our Lord, to Thee be the praise’." (Bukhari and Muslim, but Bukhari did not mention "and when he says, ‘Nor of those who err”’.)
وَعَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: " لَا تُبَادِرُوا الْإِمَامَ إِذَا كَبَّرَ فكبروا وَإِذا قَالَ: وَلَا الضَّالّين. فَقُولُوا: آمِينَ وَإِذَا رَكَعَ فَارْكَعُوا وَإِذَا قَالَ: سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ فَقُولُوا: اللَّهُمَّ رَبَّنَا لَك الْحَمد " إِلَّا أَنَّ الْبُخَارِيَّ لَمْ يَذْكُرْ: " وَإِذَا قَالَ: وَلَا الضَّالّين "