a, b = tuple(int(i) for i in input().split())

s = a + b
p = a * b

if s > p:
    ans = 'S'
elif s < p:
    ans = 'P'
else:
    ans = 'E'

print(ans)