a, b = map(int, input().split()) x = a + b y = a * b if x > y: print('S') elif x < y: print('P') else: print('E')