A,B = map(int,input().split())
ab = A + B
axb = A * B
ans = "E" if ab == axb else 0
if not ans:
    ans="S" if ab>axb else "P"
print(ans)