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