l=input().split() for i in range(0,2): l[i]=int(l[i]) l[0]=a l[1]=b if a+b==a*b: print("E") if a+b>a*b: print("S") else: print("P")