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