a,b=map(int,input().split()) if a*b>a+b:print("P") else:print("ES"[a+b>a*b])