a,b=list(map(int,input().split()))
p,m=a+b,a*b
if p==m:
    print("E")
elif p>m:
    print("S")
else:
    print("P")