## 47. Suez and Panama

A meeting took place between Egyptians and Panamanians, where issues regarding the operation of the Suez and Panama Canals were discussed. In total, there were twelve participants from both sides, with more Egyptians than Panamanians. Upon arriving at the meeting place, the Egyptians greeted each other in pairs in Arabic. The Panamanians did the same, but in Spanish. However, the Panamanians did not exchange greetings with the Egyptians, either due to language barriers or for some political reasons.

Assuming there were a total of 31 greetings exchanged, how many Egyptians and how many Panamanians were present at the meeting?
47. If $n$ people greet each other in pairs, then a total of $n(n-1) / 2$ greetings take place. Therefore, we can create the following table:

In order for there to be exactly 31 greetings, there must have been seven Egyptians and five Panamanians at the meeting.