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