Praying Together

Assalamualikum my name is Aupurbo. Someone once told me a hadith that if you prayed alone you earned 10 hasanat, but if you prayed together you earn 270 hasanat so praying together is better.