a,b=[int(i) for i in input().split()] if a*b==a+b: print("E") elif a*b>a+b: print("P") elif a+b>a*b: print("S")