A, B = [int(i) for i in input().strip().split(' ')] print('P' if A + B < A * B else 'S' if A + B > A * B else 'E')