A, B = list(map(int, input().split())) if A+B > A*B: print('S') elif A*B > A+B: print('P') else: print('E')