a = (lambda x: x[0] * x[1] - sum(x))(list(map(int, input().split()))) if a > 0: print('P') elif a == 0: print('E') else: print('S')