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