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