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