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