a,b=map(int,input().split()) c1,c2=a+b,a*b if c1==c2: print('E') elif c1>c2: print('S') else: print('P')