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