The PM was in Sharm El Sheikh to see the US president and fellow negotiators from Egypt, Qatar, and Turkey sign the agreement