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