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