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