A, B = input().split() if A == "2" and B == "2": print("E") exit() if A == "1" or A == "0" or B == "1" or B == "0": print("S") else: print("P")