a, b = map(int, input().split()) if (a, b) in {(0, 0), (2, 2)}: print("E") else: print("S" if min(a, b) <= 1 else "P")