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