A, B = map(int, input().split()) S = A + B P = A * B if S == P: print("E") elif S < P: print("P") else: print("S")