# No.441 和か積 a, b = [int(s) for s in input().split()] if a + b == a * b: print('E') elif a + b > a * b: print('S') else: print('P')