a, b = map(int, input().split()) s = a + b m = a * b if s > m: print("S") elif s < m: print("P") else: print("E")