One day Dima and Alex had an argument about the price and quality of laptops. Dima thinks that the more expensive a laptop is, the better it is. Alex disagrees. Alex thinks that there are two laptops, such that the price of the first laptop is less (strictly smaller) than the price of the second laptop but the quality of the first laptop is higher (strictly greater) than the quality of the second laptop.

Please, check the guess of Alex. You are given descriptions of n laptops. Determine whether two described above laptops exist.


-----Input-----

The first line contains an integer n (1 ≤ n ≤ 10^5) — the number of laptops.

Next n lines contain two integers each, a_{i} and b_{i} (1 ≤ a_{i}, b_{i} ≤ n), where a_{i} is the price of the i-th laptop, and b_{i} is the number that represents the quality of the i-th laptop (the larger the number is, the higher is the quality).

All a_{i} are distinct. All b_{i} are distinct. 


-----Output-----

If Alex is correct, print "Happy Alex", otherwise print "Poor Alex" (without the quotes).


-----Examples-----
Input
2
1 2
2 1

Output
Happy Alex

Source: codeforces | Difficulty: EASY
Tags: Sorting


Solutions:
from collections import OrderedDict
n = int(input())
d = []
for i in range(n):
	(k, v) = map(int, input().split())
	d.append((k, v))
d.sort(key=lambda x: x[0])
q = 0
for i in range(n - 1):
	if d[i][1] > d[i + 1][1]:
		q = 1
		break
if q == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


from typing import List, Tuple

def parse_input() -> Tuple[int, List[Tuple[int, int]]]:
	n = int(input())
	arr = []
	for _ in range(n):
		(ai, bi) = [int(x) for x in input().split()]
		arr.append((ai, bi))
	return (n, arr)

def solve(n: int, ls: List[Tuple[int, int]]) -> str:
	for (ai, bi) in ls:
		if ai != bi:
			return 'Happy Alex'
	return 'Poor Alex'
(n, ls) = parse_input()
print(solve(n, ls))


from operator import itemgetter

def main():
	n = int(input())
	a = [(int(ai), int(bi)) for _ in range(n) for (ai, bi) in (input().split(),)]
	a.sort(key=itemgetter(0))
	p = a[0][1]
	for (_, bi) in a:
		if bi < p:
			print('Happy Alex')
			return
		p = bi
	print('Poor Alex')
main()


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	if a != b:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
higher = False
for i in range(1, n + 1):
	[a, b] = list(map(int, input().split()))
	if b > a:
		higher = True
if higher:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
n = int(input())
li = []
for _ in range(n):
	li.append(list(map(int, input().split())))
li.sort(reverse=True)
l1 = []
l2 = []
for i in li:
	l1.append(i[0])
	l2.append(i[1])
for i in range(n - 1):
	if l1[i] > l1[i + 1]:
		if l2[i] < l2[i + 1]:
			print('Happy Alex')
			sys.exit()
print('Poor Alex')


n = int(input())
s = 0
for i in range(0, n):
	(x, y) = [int(a) for a in input().split()]
	if x < y:
		s = s + 1
if s > 0:
	print('Happy Alex')
else:
	print('Poor Alex')


a = int(input())
for i in range(a):
	(a, b) = map(int, input().split())
	if a != b:
		print('Happy Alex')
		quit()
print('Poor Alex')


n = int(input())
a = False
m = []
for i in range(n):
	m.append(list(map(int, input().split())))
	if m[i][0] < m[i][1]:
		a = True
print('Happy Alex' if a else 'Poor Alex')


n = int(input())
laptops = []
for _ in range(n):
	(a, b) = map(int, input().split())
	laptops.append((a, b))
laptops.sort()
quality = [elm[1] for elm in laptops]
for i in range(len(quality) - 1):
	if quality[i + 1] < quality[i]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


def dima(ls):
	res1 = sorted(ls, key=lambda x: x[0])
	res2 = sorted(ls, key=lambda x: x[1])
	if res1 == res2:
		return 'Poor Alex'
	else:
		return 'Happy Alex'
n = int(input())
ls = []
while n > 0:
	ls1 = [int(i) for i in input().split()]
	ls.append(ls1)
	n = n - 1
print(dima(ls))


n = int(input())
arr = []
for i in range(n):
	z = list(map(int, input().split()))
	arr.append(z)
arr.sort(key=lambda d: d[0])
for i in range(n - 1):
	if arr[i][1] > arr[i + 1][1]:
		status = True
		break
	else:
		status = False
if n == 1:
	print('Poor Alex')
elif status:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l_p = list()
l_q = list()
for _ in range(n):
	(p, q) = map(int, input().split())
	l_p.append(p)
	l_q.append(q)
l_l = sorted(zip(l_p, l_q))
b_q = 0
p_p = 0
for t in l_l:
	if p_p < t[0] and b_q > t[1]:
		print('Happy Alex')
		quit()
	p_p = t[0]
	b_q = max(b_q, t[1])
print('Poor Alex')


n = int(input())
c = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a != b:
		c = 1
		break
if c == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
f = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a != b and f == 0:
		print('Happy Alex')
		f = 1
if f == 0:
	print('Poor Alex')


L = [tuple(map(int, input().split())) for _ in range(int(input()))]
print('HPaopopry'[sorted(L, key=lambda x: x[0]) == sorted(L, key=lambda x: x[1])::2] + ' Alex')


N = int(input())
laptops = []
for i in range(0, N):
	laptops.append(list(map(int, input().split())))
laptops.sort(key=lambda v: v[0])
ans = 'Poor Alex'
for i in range(1, N):
	if laptops[i - 1][0] == laptops[i][0]:
		if laptops[i - 1][1] != laptops[i][1]:
			ans = 'Happy Alex'
			break
	elif laptops[i - 1][1] >= laptops[i][1]:
		ans = 'Happy Alex'
		break
print(ans)


laptops = []
for n in range(int(input())):
	(price, quality) = map(int, input().split(' '))
	laptops.append((price, quality))
laptops.sort(key=lambda x: (x[0], x[1]))
for i in range(len(laptops)):
	if laptops[i][0] != laptops[i][1]:
		print('Happy Alex')
		quit()
print('Poor Alex')


n = int(input())
p = 0
h = 0
(pr, q) = map(int, input().split())
for i in range(n - 1):
	(a, b) = map(int, input().split())
	if pr == q:
		pr = a
		q = b
		p += 1
	elif pr >= a and q <= b or (pr <= a and q >= b):
		h += 1
		pr = a
		q = b
	else:
		p += 1
if p == n - 1:
	print('Poor Alex')
elif h >= 0:
	print('Happy Alex')


n = int(input())
a = []
b = []
for i in range(0, n):
	temp = input().split()
	x = int(temp[0])
	y = int(temp[1])
	a.append(x)
	b.append(y)

def qss(a, b, l, r):
	mid = a[(l + r) // 2]
	i = l
	j = r
	while i <= j:
		while a[i] < mid:
			i = i + 1
		while a[j] > mid:
			j = j - 1
		if i <= j:
			(a[i], a[j]) = (a[j], a[i])
			(b[i], b[j]) = (b[j], b[i])
			i = i + 1
			j = j - 1
	if l < j:
		qss(a, b, l, j)
	if r > i:
		qss(a, b, i, r)
qss(a, b, 0, n - 1)
d = False
for i in range(0, len(a) - 1):
	if a[i] < a[i + 1]:
		if b[i] > b[i + 1]:
			d = True
if d is True:
	print('Happy Alex')
else:
	print('Poor Alex')


def fun():
	n = int(input())
	for i in range(n):
		(a, b) = (int(j) for j in input().split(' '))
		if a != b:
			print('Happy Alex')
			return
	print('Poor Alex')
fun()


n = int(input())
laptops = []
for _ in range(n):
	(price, quality) = (int(i) for i in input().split())
	laptops.append((price, quality))
laptops = sorted(laptops, key=lambda x: x[0])
is_alex_right = False
for i in range(len(laptops) - 1):
	if laptops[i + 1][1] < laptops[i][1]:
		is_alex_right = True
		break
if is_alex_right:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
(mod, MOD) = (1000000007, 998244353)

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
n = int(input())
Arr = []
for i in range(n):
	(a, b) = get_ints()
	Arr.append((a, b))
Arr.sort()
maxi_value = Arr[0][1]
for i in range(1, n):
	if Arr[i][1] < maxi_value:
		print('Happy Alex')
		exit()
	else:
		maxi_value = max(maxi_value, Arr[i][1])
print('Poor Alex')


n = int(input())
lista = [-1] * (n + 1)
lista[0] = float('-inf')
for i in range(n):
	x = list(map(int, input().split(' ')))
	lista[x[0]] = x[1]
maks = False
i = 0
while not maks and i <= n - 1:
	maks = lista[i] > lista[i + 1]
	i += 1
if not maks:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
l = list()
total = 0
value = 0
for i in range(0, n):
	(a, b) = map(int, input().split(' '))
	if a > b:
		total = total + 1
	elif b > a:
		value = value + 1
if total > 0 and value > 0:
	print('Happy Alex')
else:
	print('Poor Alex')


def func(n):
	counter = 0
	for i in range(n):
		l = list(map(int, input().split()))
		p1 = l[0]
		q1 = l[1]
		if p1 < q1:
			counter += 1
	if counter > 0:
		print('Happy Alex')
	else:
		print('Poor Alex')
n = int(input())
func(n)


n = int(input())
laptops = []
prices = []
qualities = []
for i in range(0, n):
	(price, quality) = map(int, input().split())
	prices.append(price)
	qualities.append(quality)
prices = sorted(range(len(prices)), key=prices.__getitem__)
qualities = sorted(range(len(qualities)), key=qualities.__getitem__)
if prices != qualities:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = []
b = []
for _ in range(n):
	(A, B) = map(int, input().split())
	a.append(A)
	b.append(B)
d = dict()
for i in range(n):
	d[a[i]] = b[i]
dd = []
for i in sorted(d.keys()):
	dd.append(d[i])
if dd == sorted(dd):
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
arr = []
mm = 0
max_qual = 0
for tt in range(n):
	(x, y) = map(int, input().split())
	arr.append([x, y, y / x])
	if mm < x:
		mm = x
		max_qual = y / x
arr = sorted(arr, key=lambda item: item[2], reverse=True)
if arr[0][2] > max_qual:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
input = sys.stdin.readline
a = int(input())
ans = []
for i in range(a):
	(x, y) = map(int, input().split())
	ans.append([x, y])
ans.sort()
ski = ans[0][1]
pri = ans[0][0]
flag = 0
if len(ans) == 1:
	print('Poor Alex')
	exit()
for i in range(1, len(ans)):
	if ans[i][1] < ski:
		if ans[i][0] > pri:
			print('Happy Alex')
			exit()
	elif ans[i][1] > ski:
		ski = ans[i][1]
		pri = ans[i][0]
print('Poor Alex')


n = int(input())
l_l = []
for i in range(n):
	a = input().split(' ')
	a = list(map(int, a))
	l_l.append(a)
l_l.sort()
alex = False
for j in range(1, n):
	if l_l[j][0] > l_l[j - 1][0] and l_l[j][1] < l_l[j - 1][1]:
		alex = True
		break
	else:
		continue
if alex:
	print('Happy Alex')
else:
	print('Poor Alex')


from operator import itemgetter

def main():
	total_num = int(input())
	laptops = []
	for i in range(total_num):
		laptops.append([int(i) for i in input().split()])
	laptops = sorted(laptops, key=itemgetter(0))
	res = all((laptops[i][1] <= laptops[i + 1][1] for i in range(len(laptops) - 1)))
	if res:
		print('Poor Alex')
	else:
		print('Happy Alex')

def __starting_point():
	main()
__starting_point()


n = int(input())
li = []
for i in range(n):
	li.append([int(j) for j in input().split()])
li.sort()
l = [i[1] for i in li]
if l != sorted(l):
	print('Happy Alex')
else:
	print('Poor Alex')


from sys import stdin, stdout, setrecursionlimit
input = stdin.readline
flush = stdout.flush
OUT = []

def write(item, sep=' '):
	if type(item) is int:
		OUT.append(str(item))
	elif type(item) is list:
		if type(item[0]) is int:
			OUT.append(sep.join(map(str, item)))
		else:
			OUT.append(sep.join(item))
	else:
		OUT.append(item)

def PRINT():
	print('\n'.join(OUT))
GI = lambda : int(input())
GS = lambda : input()[:-1]
gi = lambda : list(map(int, input().split()))
gs = lambda : input().split()
n = GI()
arr = [gi() for i in range(n)]
brr = sorted(arr)
crr = sorted([(i, j) for (j, i) in enumerate(brr)], key=lambda i: i[0][1])
for i in range(n):
	if crr[i][1] != i:
		write('Happy Alex')
		break
else:
	write('Poor Alex')
PRINT()


from sys import stdin
import math
A = int(stdin.readline())
C = list()
K = 0
for t in range(0, A):
	B = list(map(int, stdin.readline().split()))
	C.append((B[0], B[1]))
C.sort()
for u in range(0, A - 1):
	if C[u + 1][1] < C[u][1]:
		print('Happy Alex')
		K = 1
		break
if K == 0:
	print('Poor Alex')


t = int(input())
arr = []
flag = 0
for i in range(t):
	l = list(map(int, input().strip().split()))
	a = l[0]
	b = l[1]
	arr.append([a, b])
m = sorted(arr, key=lambda x: x[0])
for i in range(t - 1):
	if m[i][1] > m[i + 1][1] and m[i][0] != m[i + 1][0]:
		flag = 1
		print('Happy Alex')
		break
if flag == 0:
	print('Poor Alex')


n = int(input())
t = sorted((tuple(map(int, input().split())) for i in range(n)))
print('Happy Alex' if any((t[i + 1][1] < t[i][1] for i in range(n - 1))) else 'Poor Alex')


n = int(input())
d = {}
for _ in range(n):
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	if a not in d:
		d[a] = b
l = sorted(d.items(), key=lambda kv: kv[0])
m = []
for i in range(len(l)):
	m.append(l[i][1])
t = m.copy()
t.sort()
f = 0
for i in range(len(m)):
	if t[i] != m[i]:
		f = 1
		break
if f == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
l = 0
for i in range(n):
	(p, m) = input().split()
	if p < m:
		l = 1
if l:
	print('Happy Alex')
else:
	print('Poor Alex')


laptops = []
for _ in range(int(input())):
	laptop = list(map(int, input().split()))
	laptops.append(laptop)
laptops.sort()
truth = False
for i in range(len(laptops) - 1):
	if laptops[i][0] < laptops[i + 1][0] and laptops[i][1] > laptops[i + 1][1]:
		truth = True
		break
if truth:
	print('Happy Alex')
else:
	print('Poor Alex')


y = 0
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a != b:
		print('Happy Alex')
		y = 1
		break
if y == 0:
	print('Poor Alex')


def main():
	n = int(input())
	catalog = []
	for i in range(n):
		laptop = list(map(lambda x: int(x), input().split(' ')))
		if len(laptop) != 2:
			raise ValueError('Wrong parameters count')
		catalog.append(laptop)
	catalog.sort(key=lambda laptop: (laptop[0], laptop[1]))
	price = quality = None
	for (i, item) in enumerate(catalog):
		if price is not None and quality is not None and (price < item[0]) and (quality > item[1]):
			print('Happy Alex')
			break
		(price, quality) = item
	else:
		print('Poor Alex')
main()


n = int(input())
d = []
for _ in range(n):
	d.append(list(map(int, input().split())))
d.sort()
for i in range(n - 1):
	if d[i + 1][1] < d[i][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


N = int(input())
stuff = []
for n in range(N):
	l = list(map(int, input().split()))
	stuff.append([l[1], l[0]])
stuff.sort()
lp = -1
happy = False
for s in stuff:
	if s[1] < lp:
		happy = True
		break
	lp = s[1]
print('Happy Alex' if happy else 'Poor Alex')


n = int(input())
arr = []
for i in range(n):
	(a, b) = map(int, input().split(' '))
	arr.append((a, b))
arr = sorted(arr)
for i in range(n - 1):
	if arr[i][1] > arr[i + 1][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


def laptops(l):
	sort_by_price = sorted(l, key=lambda x: x[0])
	quality = [x[1] for x in sort_by_price]
	sorted_quality = sorted([x[1] for x in l])
	if quality == sorted_quality:
		print('Poor Alex')
	else:
		print('Happy Alex')
n = int(input())
l = []
for i in range(n):
	l.append([int(x) for x in input().split()])
laptops(l)


n = int(input())
a = [0] * 100001
for i in range(n):
	(pos, q) = map(int, input().split())
	a[pos - 1] = q
for i in range(n - 1):
	if a[i + 1] < a[i]:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
c = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x > y:
		print('Happy Alex')
		exit()
else:
	print('Poor Alex')


n = int(input())
lst = [list(map(int, input().split())) for i in range(n)]
lst.sort()
is_happy = False
for i in range(1, n):
	if lst[i][0] > lst[i - 1][0] and lst[i - 1][1] > lst[i][1]:
		is_happy = True
if is_happy:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
price = []
quality = []
for i in range(n):
	nums = list(map(int, input().split()))
	price.append((nums[0], i))
	quality.append((nums[1], i))
price.sort()
quality.sort()
correct = False
for i in range(n):
	if price[i][1] != quality[i][1]:
		correct = True
		break
if correct:
	print('Happy Alex')
else:
	print('Poor Alex')


x = int(input())
alex = False
for i in range(x):
	(a, b) = input().split(' ')
	a = int(a)
	b = int(b)
	if a < b:
		alex = True
if alex:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
tups = []
for i in range(n):
	(ai, bi) = [int(x) for x in input().split()]
	tups.append((ai, bi))
tups.sort(key=lambda x: x[0])
good = True
for i in range(n - 1):
	(_, b0) = tups[i]
	(_, b1) = tups[i + 1]
	if b0 > b1:
		good = False
if good:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
c = 0
l = []
for i in range(n):
	u = list(map(int, input().split()))
	l += [u]
l.sort()
for i in range(n - 1):
	if l[i][0] == l[i + 1][0]:
		continue
	if l[i][1] > l[i + 1][1]:
		c = 1
		break
if c:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input(''))
l = []
for i in range(n):
	s = input('')
	l1 = s.split(' ')
	l1 = list(map(int, l1))
	l.append(l1)
l1 = sorted(l)
count = 0
for i in range(n - 1):
	if l1[i][0] < l1[i + 1][0] and l1[i][1] > l1[i + 1][1]:
		count = 1
	if count == 1:
		print('Happy Alex')
		break
if count == 0:
	print('Poor Alex')


import sys
n = int(input())
arr = []
for i in range(n):
	arr.append(list(map(int, input().split())))
arr.sort()
for i in range(1, len(arr)):
	if arr[i - 1][1] > arr[i][1]:
		print('Happy Alex')
		sys.exit()
print('Poor Alex')


n = int(input())
l = []
for i in range(n):
	(a, b) = map(int, input().split(' '))
	l.append([a, b])
l = sorted(l, key=lambda x: x[0])
ans = 'Poor Alex'
for i in range(n - 1):
	if l[i][0] < l[i + 1][0] and l[i][1] > l[i + 1][1]:
		ans = 'Happy Alex'
		break
print(ans)


n = int(input())
qual = []
for i in range(n):
	(price, quality) = map(int, input().split())
	qual.append((price, quality))
happy = False
qual.sort()
Quality = qual[0][1]
for i in range(1, n):
	if qual[i][1] < Quality:
		happy = True
		break
	Quality = qual[i][1]
if happy == True:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
c = 0
for _ in range(n):
	(price, quality) = map(int, input().split())
	if price != quality:
		c = 1
		break
if c == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


from operator import itemgetter
n = int(input())
ai = [list(map(int, input().split())) for i in range(n)]
ai.sort(key=itemgetter(0))
maxi = 0
ans = 0
for i in range(n):
	maxi = max(maxi, ai[i][1])
	if maxi > ai[i][1]:
		ans = 1
		break
print('Happy Alex' * ans + 'Poor Alex' * (1 - ans))


price = []
quality = []
for _ in range(int(input())):
	(p, q) = map(int, input().split())
	price.append(p)
	quality.append(q)
ex = 0

def inp(price, quality):
	for i in range(len(price)):
		if price[i] < quality[i]:
			return 'Happy Alex'
	return 'Poor Alex'
print(inp(price, quality))


n = int(input())
li = []
for i in range(n):
	tu = list(map(int, input().split()))
	li.append(tu)
li.sort()
c = 0
for i in range(len(li) - 1):
	if li[i][0] < li[i + 1][0] and li[i][1] > li[i + 1][1]:
		c += 1
if c != 0:
	print('Happy Alex')
else:
	print('Poor Alex')


for _ in range(int(input())):
	(a, b) = input().split()
	if a != b:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
arr = []
for i in range(n):
	(a, b) = map(int, input().split(' '))
	arr.append((a, b))
arr.sort()
for i in range(1, n):
	if arr[i][1] < arr[i - 1][1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


import math
import sys
import string

def ri():
	return input()

def ii():
	return int(input())

def li():
	return input().split()

def mi():
	return list(map(int, input().split()))
n = ii()
for i in range(n):
	(a, b) = mi()
	if a != b:
		print('Happy Alex')
		exit()
print('Poor Alex')


laptops = []
l = int(input())
cond = False
for x in range(l):
	laptops.append([int(x) for x in input().split(' ')])
laptops.sort(key=lambda x: x[0])
quality = list(map(lambda x: x[1], laptops))
if quality != sorted(quality):
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = n * [0]
for i in range(n):
	a[i] = list(map(int, input().split()))
a.sort()
f = 1
for i in range(1, n):
	if a[i][1] < a[i - 1][1]:
		print('Happy Alex')
		f = 0
		break
if f:
	print('Poor Alex')


a = []
n = int(int(input()))
for _ in range(n):
	a.append(list(map(int, input().split())))
a.sort(key=lambda x: x[0])
res = 'Poor Alex'
for i in range(n - 1):
	if a[i][1] > a[i + 1][1]:
		res = 'Happy Alex'
		break
print(res)


n = int(input())
s = set()
for i in range(0, n):
	a = tuple(map(int, input().split()))
	s.add(a)
l = sorted(s)
maxx = 0
c = 0
for i in range(0, len(l)):
	if l[i][1] > maxx:
		maxx = l[i][1]
	else:
		c += 1
		break
print('Happy Alex') if c > 0 else print('Poor Alex')


n = int(input())
laptop = []
for _ in range(n):
	(a, b) = map(int, input().split(' '))
	laptop.append([a, b])
laptop.sort(key=lambda x: x[0])
found = False
for i in range(n - 1):
	if laptop[i][1] > laptop[i + 1][1]:
		found = True
		break
if found:
	print('Happy Alex')
else:
	print('Poor Alex')


x = int(input())
a = 'Happy Alex'
b = 'Poor Alex'
c = b
for i in range(x):
	(y, z) = map(int, input().split())
	if y != z:
		c = a
print(c)


l = []
n = int(input())
for _ in range(n):
	m = list(map(int, input().split()))
	l.append(m)
l.sort()
flag = 0
for i in range(n - 1):
	if l[i][1] > l[i + 1][1]:
		flag = 1
		break
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l = [list(map(int, input().split())) for i in range(n)]
l.sort(key=lambda x: x[0])
k = [i[1] for i in l]
print('Poor Alex' if k == sorted(k) else 'Happy Alex')


def is_sorted(l, f):
	return all((f(a, b) for (a, b) in zip(l[:-1], l[1:])))

def main():
	n = int(input())
	lst = map(lambda _: input(), range(n))
	lst = map(lambda s: tuple(map(int, s.split())), lst)
	lst = sorted(lst)
	if is_sorted(lst, lambda a, b: a[1] <= b[1]):
		print('Poor Alex')
	else:
		print('Happy Alex')

def __starting_point():
	main()
__starting_point()


a = int(input())
i = 0
response = 'Poor Alex'
while i < a:
	arr = list(map(int, input().split()))
	if arr[0] > arr[1]:
		response = 'Happy Alex'
	i += 1
print(response)


n = int(input())
a_b = sorted([tuple(map(int, input().split())) for i in range(n)], key=lambda x: x[0])
alex = False
for i in range(n - 1):
	if a_b[i][1] > a_b[i + 1][1]:
		alex = True
		break
print('Happy Alex' if alex else 'Poor Alex')


n = int(input())
a = []
for i in range(n):
	space = [int(i) for i in input().split()]
	a.append(space)
a.sort()
flag = False
for i in range(n - 1):
	if a[i][1] > a[i + 1][1]:
		flag = True
		break
if flag:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = 'Poor Alex'
for _ in range(n):
	(p, q) = map(int, input().split())
	if p < q:
		a = 'Happy Alex'
print(a)


import sys
import math
input = sys.stdin.readline
n = int(input())
d = {}
l = []
l1 = []
for i in range(n):
	(a, b) = (int(i) for i in input().split())
	d[a] = b
	l.append(a)
	l1.append(b)
l.sort()
l1.sort()
c = 0
for i in range(n):
	if d[l[i]] != l1[i]:
		c = 1
		break
if c == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = []
for i in range(n):
	a.append(list(map(int, input().split())))
a.sort()
for i in range(n - 1):
	if a[i][1] > a[i + 1][1]:
		print('Happy Alex')
		exit(0)
if i == n - 2 or 1:
	print('Poor Alex')


n = int(input())
cnt = 0
sums = []
while cnt < n:
	d = [int(n) for n in input().split(' ')]
	sums.append(d[0] - d[1])
	cnt += 1
if sum((1 for n in sums if n < 0)) >= 1 and sum((1 for n in sums if n > 0)):
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
s = 'Poor'
for i in range(n):
	(d, m) = map(int, input().split())
	if d < m:
		s = 'Happy'
print(s, 'Alex')


x = int(input(''))
price = []
quality = []
priqual = []
space_index = 0
for i in range(x):
	inp = input()
	for find_space in range(len(inp)):
		if inp[find_space] == ' ':
			space_index = find_space
			break
	price.append(int(inp[:space_index]))
	quality.append(int(inp[space_index + 1:]))
priqual = sorted(zip(price, quality))
for i in range(x):
	try:
		if priqual[i][0] < priqual[i + 1][0] and priqual[i][1] > priqual[i + 1][1]:
			print('Happy Alex')
			break
	except:
		print('Poor Alex')
		break


LIST = []
n = int(input())
for i in range(n):
	line = [int(s) for s in input().split()]
	LIST.append(line)
LIST.sort(key=lambda item: (item[0], item[1]))
for i in range(n - 1):
	if LIST[i][0] < LIST[i + 1][0]:
		if LIST[i][1] > LIST[i + 1][1]:
			print('Happy Alex')
			break
else:
	print('Poor Alex')


n = int(input())
data = sorted([tuple(map(int, input().split())) for _ in range(n)])
order = True
for i in range(1, n):
	if data[i][1] < data[i - 1][1]:
		order = False
		break
print(('Happy', 'Poor')[order] + ' Alex')


n = int(input())
l = []
for i in range(n):
	(a, b) = map(int, input().split())
	l.append([a, b])
f = 1
l.sort()
for i in range(n - 1):
	if l[i][0] < l[i + 1][0] and l[i][1] > l[i + 1][1]:
		f = 0
		break
if f == 0:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
quality = {}
co = False
for i in range(n):
	(price, quality) = map(int, input().split())
	if price != quality:
		co = True
if co:
	print('Happy Alex')
else:
	print('Poor Alex')


def laptops():
	n = int(input())
	laptop = []
	for _ in range(n):
		(c, q) = [int(i) for i in input().split()]
		laptop.append((c, q))
	laptop.sort()
	for i in range(n - 1):
		if laptop[i][1] > laptop[i + 1][1]:
			return 'Happy Alex'
	return 'Poor Alex'
print(laptops())


n = int(input())
Alex = False
for i in range(n):
	st = input().split()
	if st[0] != st[1]:
		Alex = True
if Alex:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = []
for i in range(n):
	a.append([int(x) for x in input().split()])
a.sort()
tr = False
for i in range(len(a) - 1):
	if a[i][1] > a[i + 1][1]:
		tr = True
if tr:
	print('Happy Alex')
else:
	print('Poor Alex')


import math

def get_primes(prime_supr):
	is_prime = [0] * 2 + [1] * prime_supr
	for i in range(2, int(math.sqrt(prime_supr)) + 1):
		if is_prime[i]:
			for j in range(i * i, prime_supr + 1, i):
				is_prime[j] = 0
	return is_prime
get_int = lambda : map(int, input().split())
n = int(input())
r = []
for i in range(n):
	(a, b) = get_int()
	r.append([a, b])
r.sort(key=lambda x: x[0])
for i in range(n - 1):
	if r[i + 1][1] < r[i][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
c = 0
j = 0
for i in range(n):
	s = list(map(int, input().split()))
	if s[0] < s[len(s) - 1]:
		c += 1
if c >= 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
laptops = []
for i in range(n):
	laptops.append(list(map(int, input().split())))
laptops.sort()
ret = False
for i in range(n - 1):
	if laptops[i][1] + 1 != laptops[i + 1][1]:
		ret = True
		break
if ret:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
input = lambda : sys.stdin.readline().strip('\r\n')
n = int(input())
a = 'Poor Alex'
for i in range(n):
	(b, c) = map(int, input().split())
	if b < c:
		a = 'Happy Alex'
print(a)


num_laptops = int(input())
prices = []
qualities = []
for n in range(num_laptops):
	(p, q) = [int(x) for x in input().split()]
	prices.append((p, n))
	qualities.append((q, n))
prices.sort(key=lambda x: x[0])
qualities.sort(key=lambda x: x[0])
for i in range(num_laptops):
	if prices[i][1] != qualities[i][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


reps = int(input())
a = {}
temp = []
for i in range(0, reps):
	numbers = [int(n) for n in input().split()]
	a[numbers[0]] = numbers[1]
b = sorted(a.keys())
cheaper = False
for i in range(1, len(b)):
	if a[b[i - 1]] > a[b[i]]:
		cheaper = True
if cheaper:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l = []
for i in range(n):
	(a, b) = map(int, input().split())
	l.append((a, b))
l = sorted(l, key=lambda x: x[1])
l2 = sorted(l, key=lambda x: x[0])
print(['Poor Alex', 'Happy Alex'][l != l2])


n = int(input())
a = []
l = []
for i in range(n):
	(x, y) = map(int, input().split())
	l.append((x, y))
	a.append((x, y))
l.sort(key=lambda x: x[0])
a.sort(key=lambda x: x[1])
for i in range(n):
	if a[i][0] < l[i][0] and a[i][1] > l[i][1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


def main():
	laptops = eval(input())
	i = 1
	flag = False
	while i <= laptops:
		lst = list(map(int, input().split()))
		if lst[0] / lst[1] != 1:
			flag = True
			break
		i += 1
	print('Happy Alex' if flag else 'Poor Alex')
main()


from sys import stdin, stdout
n = int(stdin.readline())
Allinput = stdin.readlines()
A = []
B = []
for i in Allinput:
	(a, b) = map(int, i.split())
	A.append([a, b])
	B.append(b)
A.sort()
C = [i[1] for i in A]
B.sort()
if B == C:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
f = []
for i in range(n):
	f.append(list(map(int, input().split())))
f.sort()
x = 0
for (a, b) in f:
	if b < x:
		print('Happy Alex')
		exit()
	x = b
print('Poor Alex')


n = int(input())
l = []
f = 0
for _ in range(n):
	(a, b) = map(int, input().split())
	if a != b:
		f = 1
if not f:
	print('Poor Alex')
else:
	print('Happy Alex')


def main():
	n = int(input())
	l = []
	for i in range(0, n):
		[p, q] = list(map(int, input().split(' ')))
		l.append({'p': p, 'q': q})
	l.sort(key=lambda x: x['p'])
	for i in range(0, n - 1):
		if (l[i]['q'] - l[i + 1]['q']) * (l[i]['p'] - l[i + 1]['p']) < 0:
			print('Happy Alex')
			return
	print('Poor Alex')
main()


def fn(t):
	return t[0]
n = int(input())
l = []
for _ in range(n):
	pq = tuple(map(int, input().split()))
	l.append(pq)
reorder = sorted(l, key=fn)
quality = []
for i in reorder:
	quality.append(i[1])
ans = 0
for i in range(n - 1):
	if quality[i] > quality[i + 1]:
		ans = 1
		break
if ans:
	print('Happy Alex')
else:
	print('Poor Alex')


happy = False
m = []
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	m.append((a, b))
m.sort()
max1 = m[0][1]
for i in m[1:len(m)]:
	if i[1] <= max1:
		happy = True
		break
	max1 = max(max1, i[1])
if happy:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
notes = []
for i in range(n):
	notes.append(list(map(int, input().split())))
print('Poor Alex' if sorted(notes, key=lambda note: note[1]) == sorted(notes) else 'Happy Alex')


n = int(input())
h = 'Poor Alex'
for _ in ' ' * n:
	(a, b) = map(int, input().split())
	if a < b:
		h = 'Happy Alex'
		break
print(h)


n = int(input())
comp = []
t = 0
while t < n:
	comp.append([int(i) for i in input().split()])
	t = t + 1
comp.sort(key=lambda x: x[0])
jj = 0
for i in range(1, n):
	if comp[i - 1][1] > comp[i][1]:
		print('Happy Alex')
		jj = 1
		break
if jj == 0:
	print('Poor Alex')


import sys
input = sys.stdin.readline
n = int(input())
d = []
for i in range(n):
	(a, b) = map(int, input().split())
	d.append([a, b])
d.sort()
ans = 'Poor Alex'
for i in range(n - 1):
	if d[i][0] < d[i + 1][0] and d[i][1] > d[i + 1][1]:
		ans = 'Happy Alex'
		break
print(ans)


n = int(input())
laptops = []
for i in range(n):
	laptops.append([int(x) for x in input().split()])
pm = n + 1
cnt = -1
for l in laptops:
	if l[1] / l[0] != pm:
		cnt += 1
		pm = l[1] / l[0]
	if cnt > 0:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


from sys import stdin, stdout
mp = lambda : map(int, stdin.readline().split())
n = int(input())
s = 'Poor'
for _ in range(n):
	(a, b) = mp()
	if a != b:
		s = 'Happy'
print(s + ' Alex')


n = int(input())
a = [tuple(map(int, input().split())) for _ in range(n)]
a.sort(key=lambda item: item[0])
sr = ''
for i in range(1, n):
	if a[i][1] < a[i - 1][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
res = []
for i in range(n):
	(u, v) = map(int, input().split())
	res.append((u, v))
res.sort(key=lambda x: (x[0], -x[1]))
flag = False
for i in range(0, len(res) - 1):
	x = res[i][0] < res[i + 1][0]
	y = res[i][1] > res[i + 1][1]
	if x and y:
		print('Happy Alex')
		flag = True
		break
if flag == False:
	print('Poor Alex')


n = int(input())
a = []
b = []
for i in range(n):
	(x, y) = map(int, input().split())
	a.append(x)
	b.append(y)
a.sort(key=dict(zip(a, b)).get)
flag = 0
for i in range(n - 1):
	if a[i] > a[i + 1]:
		flag = 1
		break
if flag == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
laptops = []
for i in range(n):
	laptops.append([int(j) for j in input().split()])
laptops.sort(key=lambda x: x[0])
result = 'Poor Alex'
for i in range(n - 1):
	l1 = laptops[i]
	l2 = laptops[i + 1]
	if l1[0] < l2[0] and l1[1] > l2[1]:
		result = 'Happy Alex'
		break
print(result)


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

def read_int():
	return int(stdin.readline())

def read_ints():
	return [int(x) for x in stdin.readline().split()]

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]
nb_laptop = read_int()
ans = 'Poor Alex'
for _ in range(nb_laptop):
	(p, q) = read_ints()
	if p < q:
		ans = 'Happy Alex'
		break
print(ans)


n = int(input())
s = 0
for i in range(n):
	(a, b) = input().split()
	if s == 0:
		if a != b:
			print('Happy Alex')
			s = -1
			break
if s == 0:
	print('Poor Alex')


N = int(input())
laptops = [None] * N
for i in range(N):
	laptops[i] = list(map(int, input().split()))
laptops = sorted(laptops)
if any((laptops[i][1] > laptops[i + 1][1] for i in range(N - 1))):
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
r = []
for i in range(n):
	r.append([int(x) for x in input().split()])
r.sort()
a = 0
for i in range(1, len(r)):
	if r[i][1] < r[i - 1][1]:
		a = 1
		break
if a == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
d = {}
for i in range(0, n):
	(price, qty) = map(int, input().split())
	d[price] = qty
for i in sorted(d)[:len(d) - 1]:
	if d[i] > d[i + 1] and i < i + 1:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
a = []
c = 0
for i in range(n):
	a.append(list(map(int, input().split())))
	if a[i][0] == a[i][1]:
		c += 0
	else:
		c += 1
if c == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


import sys
import math

def main():
	n = int(sys.stdin.readline().strip())
	for _ in range(n):
		(a, b) = map(int, sys.stdin.readline().strip().split()[:2])
		if a != b:
			print('Happy Alex')
			exit()
	print('Poor Alex')
main()


from sys import stdin
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline()
a = []
n = ii()
for _ in range(n):
	a.append(li())
a.sort()
for i in range(1, n):
	if a[i][0] != a[i - 1][0]:
		if a[i][1] < a[i - 1][1]:
			print('Happy Alex')
			exit()
print('Poor Alex')


count = int(input())
lis = []
for i in range(0, count):
	inp = input()
	a = int(inp.split()[0])
	b = int(inp.split()[1])
	lis.append((a, b))
lis.sort()
for i in range(0, count - 1):
	if lis[i][0] < lis[i + 1][0] and lis[i][1] > lis[i + 1][1]:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


def quality(laptop):
	return laptop[1]
laptops = []
for i in range(int(input())):
	laptops.append([int(c) for c in input().split()])
laptops.sort(key=quality, reverse=True)
alex = False
for i in range(1, len(laptops)):
	if laptops[i - 1] < laptops[i]:
		alex = True
		break
if alex:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
li = []
for i in range(n):
	(a, b) = map(int, input().split())
	li.append((a, b))
li.sort()
old = li[0][1]
flag = 0
for i in range(1, len(li)):
	ne = li[i][1]
	if old > ne:
		print('Happy Alex')
		flag = 1
		break
	old = ne
if flag == 0:
	print('Poor Alex')


n = int(input())
l = [[0, 0] for x in range(n)]
for i in range(n):
	(l[i][0], l[i][1]) = [int(x) for x in input().split()]
l1 = sorted(l, key=lambda x: (x[0], x[1]))
l2 = sorted(l, key=lambda x: (x[1], x[0]))
if l1 != l2:
	print('Happy Alex')
else:
	print('Poor Alex')


def key(a):
	return a[0]

def main():
	count = int(input())
	arr = []
	for i in range(count):
		temp = [int(i) for i in input().split()]
		arr.append(temp)
	arr.sort(key=key)
	for i in range(count - 1):
		if arr[i][0] < arr[i + 1][0] and arr[i][1] > arr[i + 1][1]:
			print('Happy Alex')
			return 0
	print('Poor Alex')
main()


lst = []
for i in range(int(input())):
	(a, b) = map(int, input().split())
	lst.append((a, b, b - a))
lst.sort(key=lambda x: x[2], reverse=True)
a = min(lst, key=lambda x: x[2])
b = max(lst, key=lambda x: x[2])
if a[0] > b[0] and a[1] < b[1]:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = [[int(i) for i in input().split()] for j in range(n)]
a.sort()
for i in range(n - 1):
	if a[i][1] > a[i + 1][1]:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


n = int(input())
l = []
for i in range(n):
	l.append(input().split())
for i in range(n):
	for j in range(2):
		l[i][j] = int(l[i][j])
l.sort()
a = 0
for i in range(n - 1):
	if l[i][1] > l[i + 1][1] and l[i][0] < l[i + 1][0]:
		a = 1
		print('Happy Alex')
		break
if a == 0:
	print('Poor Alex')


answer = 'Poor Alex'
for _ in range(int(input())):
	(a, b) = input().split()
	if a != b:
		answer = 'Happy Alex'
print(answer)


entrada = int(input())
sub = 0
ind = 0
pos = 0
tuplas = []
flag = False
for i in range(entrada):
	tupla = list((int(x) for x in input().split()))
	tuplas.append(tupla)
	s = tupla[0] - tupla[1]
	if s < 0:
		if sub == 0 and pos == 0:
			sub = s
			ind = i
		elif s < sub or s == sub:
			if tuplas[ind][0] > tupla[0] and tuplas[ind][1] < tupla[1]:
				flag = True
				break
		else:
			flag = True
			break
	elif s > 0:
		if sub != 0:
			flag = True
			break
		pos += 1
if flag:
	print('Happy Alex')
else:
	print('Poor Alex')


a = 'Poor'
for i in range(int(input())):
	(b, c) = input().split()
	if b != c:
		a = 'Happy'
print(a, 'Alex')


no_of_laptops = int(input())
laptops = []
correct = False
for i in range(no_of_laptops):
	price_and_quality = []
	user_input = input()
	price_and_quality.append(int(user_input.split()[0]))
	price_and_quality.append(int(user_input.split()[1]))
	laptops.append(price_and_quality)
laptops.sort()
j = 0
while j < no_of_laptops - 1 and (not correct):
	if laptops[j][1] > laptops[j + 1][1]:
		correct = True
		break
	j += 1
if correct:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
info = list()
for i in range(n):
	info.append(list(map(int, input().split(' '))))
info.sort(key=lambda x: x[0])
alex = False
for i in range(n - 1):
	if info[i][1] > info[i + 1][1]:
		alex = True
		break
if alex:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
(p, q) = ([], [])
for _ in range(n):
	(a, b) = map(int, input().split())
	p.append(a)
	q.append(b)
c = sorted(zip(p, q))
d = list(zip(*c))
m = 0
e = list(d[1])
for i in range(n - 1):
	if e[i] > e[i + 1]:
		m = 1
		break
if m == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


a = int(input())
p = []
q = []
d = {}
if a == 1:
	print('Poor Alex')
else:
	for i in range(a):
		b = input().split()
		p.append(int(b[0]))
		q.append(int(b[1]))
		d[p[i]] = q[i]
	p.sort()
	v = 0
	for i in range(a - 1):
		m = p[i]
		if d[m] > d[m + 1]:
			v = 0
			print('Happy Alex')
			break
		else:
			v = 1
	if v == 1:
		print('Poor Alex')


price = []
quality = []

def check():
	for (a, b) in price:
		for (c, d) in quality:
			if a > c and d > b:
				return True
	return False
n = int(input())
for i in range(n):
	(a, b) = [int(a) for a in input().split()]
	x = (a, b)
	if a > b:
		price.append(x)
	else:
		quality.append(x)
if check():
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l1 = []
l2 = []
for i in range(n):
	(a, b) = map(int, input().split())
	l1.append(a)
	l2.append(b)
ans = 'Poor Alex'
for i in range(len(l1)):
	if l1[i] < l2[i]:
		x = 'Happy Alex'
		break
	else:
		x = 'Poor Alex'
print(x)


n = int(input())
temp1 = 0
for x in range(n):
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	if a < b:
		temp1 += 1
if temp1 == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


import sys
from collections import OrderedDict
input = sys.stdin.readline
output = sys.stdout
var = -1
flag = False

def inlt():
	return list(map(int, input().split()))
dic = {}
t = int(input())
for i in range(t):
	l = inlt()
	dic[l[0]] = l[1]
dic1 = OrderedDict(sorted(dic.items()))
for i in dic1.values():
	if i < var:
		flag = True
		break
	var = i
if flag == True:
	output.write('Happy Alex' + '\n')
else:
	output.write('Poor Alex' + '\n')


n = int(input())
mass = []
for i in range(n):
	mass.append([int(k) for k in input().split()])
mass.sort(key=lambda item: (item[0], item[1]))
res = 0
for i in range(n - 1):
	if mass[i][0] < mass[i + 1][0] and mass[i][1] > mass[i + 1][1]:
		res = 1
		break
print('Happy Alex' if res == 1 else 'Poor Alex')


n = int(input())
laptops = []
for _ in range(n):
	(ai, bi) = [int(i) for i in input().split()]
	laptops.append((ai, bi))
first = sorted(laptops, key=lambda x: x[0])
second = sorted(laptops, key=lambda x: x[1])
if first != second:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
n = int(input())
adict = dict()
for _ in range(n):
	(a, b) = map(int, sys.stdin.readline().split())
	adict[a] = b
la = sorted(adict.keys())
for i in range(len(la) - 1):
	if adict[la[i + 1]] < adict[la[i]]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
while n:
	(x, y) = map(int, input().split())
	c = 0
	if x < y:
		print('Happy Alex')
		c = 1
		break
	n -= 1
if c != 1:
	print('Poor Alex')
n -= 1


li = [[int(x) for x in input().split()] for i in range(int(input()))]
li = sorted(li, key=lambda item: item[0])
mi = li[0]
if len(li) == 1:
	print('Poor Alex')
else:
	for i in range(1, len(li)):
		if li[i - 1][1] > li[i][1]:
			print('Happy Alex')
			break
	else:
		print('Poor Alex')


n = int(input())
a = []
for i in range(0, n):
	b = list(map(int, input().split()))
	a.append(b)
a.sort(key=lambda x: x[0])
c = False
for j in range(0, n - 1):
	if a[j][1] > a[j + 1][1]:
		c = True
		break
if c:
	print('Happy Alex')
else:
	print('Poor Alex')


s = 'Poor Alex'
for i in range(int(input())):
	(a, b) = (int(j) for j in input().split())
	if a != b:
		s = 'Happy Alex'
print(s)


t = int(input())
a = []
for i in range(t):
	a += [list(map(int, input().split()))]
a.sort()
for i in range(t - 1):
	if a[i][1] > a[i + 1][1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
p = [[0, 0] for i in range(n)]
for i in range(0, n):
	(p[i][0], p[i][1]) = map(int, input().split())
if n == 1:
	print('Poor Alex')
else:
	p = sorted(p)
	s = 0
	for i in range(0, n - 1):
		if p[i][1] > p[i + 1][1]:
			s = 1
			break
	if s == 0:
		print('Poor Alex')
	else:
		print('Happy Alex')


length = input()
a = []
b = []
truth = True
for i in range(0, int(length)):
	arr = [int(j) for j in input().split()]
	if arr[0] != arr[1]:
		truth = False
		break
if truth == True:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
laptopList = []
for i in range(0, n):
	laptopList.append([int(i) for i in input().split()])
laptopList.sort()
sortedByQuality = sorted(laptopList, key=lambda x: x[1])
print('Poor Alex' if sortedByQuality == laptopList else 'Happy Alex')


def main():
	n = int(input())
	lst = []
	for i in range(n):
		(a, b) = list(map(int, input().split()))
		lst.append([a, b])
	lst.sort()
	isdone = 0
	for i in range(1, n):
		if lst[i][1] < lst[i - 1][1]:
			isdone = 1
			break
	if isdone == 1:
		print('Happy Alex')
	else:
		print('Poor Alex')
t = 1
while t != 0:
	main()
	t -= 1


n = int(input())
di = {}
li1 = []
li2 = []
exis = 0
for i in range(0, n):
	t = input()
	t = t.split()
	di[t[0]] = t[1]
	if t[0] != t[1]:
		li1.append(t[0])
		li2.append(t[1])
		if exis == 0:
			li1.sort()
			li2.sort()
			for j in li1:
				if di[j] != li2[li1.index(j)]:
					exis = 1
					break
if exis == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
note = [[0, 0]] * n
for i in range(n):
	note[i] = list(map(int, input().split()))
note.sort()
for i in range(1, n):
	if note[i - 1][1] > note[i][1]:
		print('Happy Alex')
		quit()
print('Poor Alex')


def laptops():
	_n = input()
	n = int(_n)
	l = []
	for i in range(n):
		(_x, _y) = input().split()
		x = int(_x)
		y = int(_y)
		p = (x, y)
		l.append(p)
	l.sort(key=lambda x: x[0])
	for i in range(n - 1):
		if l[i][1] > l[i + 1][1]:
			print('Happy Alex')
			return
	print('Poor Alex')
laptops()


n = int(input())
flag = 0
td = []
found = 0
for i in range(n):
	x = [int(i) for i in input().split()]
	td.append(x)
td.sort()
for i in range(n - 1):
	if td[i][0] < td[i + 1][0]:
		if td[i][1] > td[i + 1][1]:
			print('Happy Alex')
			found = 1
			break
if found == 0:
	print('Poor Alex')


n = int(input())
a = sorted([list(map(int, input().split())) for _ in range(n)])
ok = False
for i in range(n - 1):
	if a[i][1] > a[i + 1][1]:
		ok = True
print(('Happy' if ok else 'Poor') + ' Alex')


n = int(input())
t = 'Poor Alex'
for i in range(n):
	(a, b) = map(int, input().split())
	if a != b:
		t = 'Happy Alex'
		break
print(t)


n = int(input())
z = []
for _ in range(n):
	(a, b) = map(int, input().split())
	if a != b:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


for _ in range(int(input())):
	(p, q) = map(int, input().split())
	if p != q:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
alex_right = False
store = []
for i in range(n):
	(price, quality) = [int(j) for j in input().split(' ')]
	store.append((price, quality))
store = sorted(store, key=lambda x: x[0])
for i in range(n - 1):
	if store[i][1] > store[i + 1][1]:
		alex_right = True
		break
if alex_right:
	print('Happy Alex')
else:
	print('Poor Alex')


from sys import stdin
n = int(stdin.readline())
a = 'Poor Alex'
for _ in range(n):
	(b, c) = map(int, stdin.readline().split())
	if b < c:
		a = 'Happy Alex'
		break
print(a)


n = int(input())
arr = []
for i in range(n):
	z = input().split()
	a = int(z[0])
	b = int(z[1])
	arr.append((a, b))
arr.sort()
ans = False
prev = 0
lol = 0
for (a, b) in arr:
	if a != prev:
		ans |= lol > b
	prev = a
	lol = b
print('Happy Alex' if ans else 'Poor Alex')


n = int(input())
f = False
for i in range(0, n):
	(a, b) = map(int, input().split())
	if a != b:
		f = True
if f:
	print('Happy Alex')
else:
	print('Poor Alex')


n = input()
laptops = []
for z in range(int(n)):
	laptop = dict()
	(laptop['price'], laptop['quality']) = map(int, input().split(' '))
	laptops.append(laptop)
laptops.sort(key=lambda k: (k['price'], k['quality']))
for index in range(len(laptops) - 1):
	if laptops[index]['quality'] >= laptops[index + 1]['quality']:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


import sys, os
from math import sqrt, gcd, ceil, log, floor, sin, pi
from math import factorial as fact
from bisect import bisect, bisect_left
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
from itertools import permutations
input = sys.stdin.readline
read = lambda : list(map(int, input().strip().split()))
MOD = 10 ** 9 + 7

def main():
	n = int(input())
	arr = [read() for i in range(n)]
	arr.sort()
	prev_max = 0
	for i in range(n):
		if arr[i][1] < prev_max:
			print('Happy Alex')
			return
		else:
			prev_max = arr[i][1]
	print('Poor Alex')
main()


value = int(input())
array = []
for i in range(value):
	(a, b) = input().split()
	array.append([int(a), int(b)])
array = sorted(array, key=lambda x: -x[0])

def check():
	for i in range(-1, value - 1, 1):
		if array[i][0] < array[i][1]:
			return True
	return False
if check():
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = [list((int(a) for a in input().split())) for i in range(n)]
a = sorted(a)
k = 0
for i in range(1, len(a)):
	if a[k][1] > a[i][1]:
		print('Happy Alex')
		break
	else:
		k += 1
if k == len(a) - 1:
	print('Poor Alex')


n = int(input())
for _ in range(n):
	(x, y) = [int(x) for x in input().split(' ')]
	if x != y:
		print('Happy Alex')
		exit()
print('Poor Alex')


N = int(input())
laptops = []
for i in range(0, N, 1):
	temp = []
	for i in input().split():
		temp.append(int(i))
	laptops.append(temp)
laptops = sorted(laptops)
if any((laptops[i][1] > laptops[i + 1][1] for i in range(0, N - 1, 1))):
	print('Happy Alex')
else:
	print('Poor Alex')


N = int(input())
A = []
B = []
for i in range(N):
	(a, b) = map(int, input().split())
	A.append(a)
	B.append(b)
mind = {}
for i in range(N):
	if A[i] in mind:
		mind[A[i]] = min(B[i], mind[A[i]])
	else:
		mind[A[i]] = B[i]
tuples = []
for (k, v) in mind.items():
	tuples.append((k, v))
tuples.sort()
m = len(tuples)
for i in range(m - 1):
	if tuples[i][1] > tuples[i + 1][1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
L = []
for i in range(n):
	L.append([int(x) for x in input().split()])
L.sort(key=lambda x: x[0])
q = L[0][1]
for i in range(n):
	if L[i][1] > q:
		q = L[i][1]
	elif L[i][1] < q:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
temp = []
for i in range(n):
	temp.append(input().split(' '))
prices = []
ratings = []
for x in temp:
	prices.append(int(x[0]))
	ratings.append(int(x[1]))
mapper = dict()
for i in range(len(prices)):
	mapper[prices[i]] = ratings[i]
res = []
for i in sorted(mapper.keys()):
	res.append(mapper[i])
copy = sorted(res)
if len(res) == 1 or copy == res:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
f = False
for i in range(0, n):
	a = input().split()
	x = list(a)
	if x[0] < x[1]:
		f = True
if not f:
	print('Poor Alex')
else:
	print('Happy Alex')


cost = []
qual = []
for _ in range(0, int(input())):
	(c, q) = map(int, input().strip().split())
	cost.append([c, q])
cost.sort()
flag3 = 0
for i in range(0, len(cost) - 1):
	if cost[i][1] > cost[i + 1][1]:
		print('Happy Alex')
		flag3 = 1
		break
if flag3 == 0:
	print('Poor Alex')


n = int(input())
(price, quality) = map(int, input().split())
high_quality_laptop = low_price_laptop = high_price_laptop = low_quality_laptop = (price, quality)
for i in range(n - 1):
	(price, quality) = map(int, input().split())
	if price > low_price_laptop[0] and quality < low_price_laptop[1]:
		print('Happy Alex')
		break
	elif price < low_price_laptop[0]:
		low_price_laptop = (price, quality)
	if price > high_quality_laptop[0] and quality < high_quality_laptop[1]:
		print('Happy Alex')
		break
	elif quality > high_quality_laptop[1]:
		high_quality_laptop = (price, quality)
	if price < high_price_laptop[0] and quality > high_price_laptop[1]:
		print('Happy Alex')
		break
	elif price > high_price_laptop[0]:
		high_price_laptop = (price, quality)
	if price < low_quality_laptop[0] and quality > low_quality_laptop[1]:
		print('Happy Alex')
		break
	elif quality > low_quality_laptop[1]:
		low_quality_laptop = (price, quality)
else:
	print('Poor Alex')


n = int(input())
d = dict()
for i in range(n):
	(a, b) = [int(x) for x in input().split()]
	d[a] = b
k = sorted(d.keys())
f = False
for i in range(1, n):
	if d[k[i]] < d[k[i - 1]]:
		print('Happy Alex')
		f = True
		break
if f == False:
	print('Poor Alex')


n = int(input())
k = 0
while n > 0:
	n = n - 1
	(b, c) = map(int, input().split())
	if b != c:
		k = 1
if k == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
dic = {}
for i in range(n):
	(a, b) = map(int, input().split())
	dic[a] = b
a = sorted(dic.keys())
for i in range(len(a) - 1):
	if dic[a[i]] > dic[a[i + 1]]:
		print('Happy Alex')
		exit()
print('Poor Alex')


ans = False
for i in range(int(input())):
	if i == 0:
		(priceF, qualityF) = [int(x) for x in input().split()]
		ef = abs(qualityF - priceF)
	else:
		(price, quality) = [int(x) for x in input().split()]
		if price < priceF and quality > qualityF:
			ans = True
		elif priceF < price and qualityF > quality:
			ans = True
		elif abs(quality - price) > ef:
			ef = quality - price
			qualityF = quality
			priceF = price
if ans:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
ans = 'Poor Alex'
i = 0
while i < n:
	a = input().split()
	if int(a[0]) != int(a[1]):
		ans = 'Happy Alex'
		break
	i += 1
print(ans)


import math
n = int(input())
laps = []
for i in range(n):
	temp = list(map(int, input().split()))
	laps.append(temp)
laps.sort(key=lambda x: x[1])
price = laps[-1][0]
flag = 0
for desc in laps[len(laps) - 2::-1]:
	if desc[0] > price:
		flag = 1
		break
	else:
		price = desc[0]
	if flag == 1:
		break
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


v = int(input())
x = [None] * v
for i in range(v):
	x[i] = list(map(int, input().split()))
x = sorted(x)
if any((x[i][1] > x[i + 1][1] for i in range(v - 1))):
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
mas = []
for i in range(n):
	mas.append(list(map(int, input().split())))
mas.sort(key=lambda x: x[0])
for i in range(n):
	if mas[i][0] != mas[i][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


s = []
for i in range(int(input())):
	(a, b) = map(int, input().split())
	s.append([a, b])
s.sort()
d = [s[i][1] for i in range(len(s))]
v = list(d)
v.sort()
if d != v:
	print('Happy Alex')
else:
	print('Poor Alex')


import itertools as ittls
from collections import Counter
import string

def sqr(x):
	return x * x

def inputarray(func=int):
	return map(func, input().split())
N = int(input())
A = [(None, None)] * N
for i in range(N):
	A[i] = tuple(inputarray())
A.sort()
prefixes = [None] * N + [float('inf')]
for i in range(len(A) - 1, -1, -1):
	prefixes[i] = min(prefixes[i + 1], A[i][1])
for i in range(N):
	if A[i][1] > prefixes[i + 1]:
		print('Happy Alex')
		quit()
print('Poor Alex')


n = int(input())
t = []
f = []
for item in range(n):
	(a, b) = list(map(int, input().split()))
	t.append([a, b])
al = sorted(t)
bl = sorted(t, key=lambda x: x[1])
for item in range(len(t)):
	if al[item][0] - bl[item][0] > 0 and al[item][1] - bl[item][1] < 0:
		f.append('1')
if len(f) > 0:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
import time
import os
from math import sqrt, log, log2, log10, gcd, floor, pow, sin, cos, tan, pi, inf, factorial
from copy import copy, deepcopy
from sys import exit, stdin, stdout
from collections import Counter, defaultdict, deque
from itertools import permutations
import heapq
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = 1000000007
iinp = lambda : int(sys.stdin.readline())
inp = lambda : sys.stdin.readline().strip()
strl = lambda : list(inp().strip().split(' '))
intl = lambda : list(map(int, inp().split(' ')))
mint = lambda : map(int, inp().split())
flol = lambda : list(map(float, inp().split(' ')))
flush = lambda : stdout.flush()

def permute(nums):

	def fun(arr, nums, cur, v):
		if len(cur) == len(nums):
			arr.append(cur.copy())
		i = 0
		while i < len(nums):
			if v[i]:
				i += 1
				continue
			else:
				cur.append(nums[i])
				v[i] = 1
				fun(arr, nums, cur, v)
				cur.pop()
				v[i] = 0
				i += 1
		return arr
	res = []
	nums.sort()
	v = [0] * len(nums)
	return fun(res, nums, [], v)

def subsets(res, index, arr, cur):
	res.append(cur.copy())
	for i in range(index, len(arr)):
		cur.append(arr[i])
		subsets(res, i + 1, arr, cur)
		cur.pop()
	return res

def sieve(N):
	root = int(sqrt(N))
	primes = [1] * (N + 1)
	(primes[0], primes[1]) = (0, 0)
	for i in range(2, root + 1):
		if primes[i]:
			for j in range(i * i, N + 1, i):
				primes[j] = 0
	return primes

def bs(arr, l, r, x):
	if x < arr[0] or x > arr[len(arr) - 1]:
		return -1
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	p = int(sqrt(n))
	for i in range(5, p + 1, 6):
		if n % i == 0 or n % (i + 2) == 0:
			return False
	return True

def solve():
	n = iinp()
	arr = []
	for i in range(n):
		(p, f) = mint()
		arr.append([p, f])
	arr.sort()
	maxf = 0
	maxp = 0
	for i in range(n):
		if arr[i][0] > maxp and arr[i][1] < maxf:
			print('Happy Alex')
			return
		elif arr[i][0] > maxp:
			maxp = arr[i][0]
			maxf = arr[i][1]
	print('Poor Alex')
start_time = time.time()
solve()


def read():
	inputs = input().strip()
	return list(map(int, inputs.split()))
n = int(input())
a = []
for i in range(n):
	(x, y) = map(int, input().split(' '))
	a.append((x, y))
a.sort()
if n == 1:
	print('Poor Alex')
else:
	res = False
	for i in range(1, n):
		if a[i][1] < a[i - 1][1]:
			res = True
	if res == True:
		print('Happy Alex')
	else:
		print('Poor Alex')


n = int(input())
a = []
for _ in range(n):
	a.append(list(map(int, input().split())))

def sort1(val):
	return val[0]
a.sort(key=sort1)
k = a[0][1]
l = 0
for _ in range(len(a)):
	if a[_][1] > k:
		k = a[_][1]
	if a[_][1] < k:
		print('Happy Alex')
		l = 1
		break
if l == 0:
	print('Poor Alex')


class laptop:

	def __init__(x, _price, _quality):
		x.price = _price
		x.quality = _quality

	def __lt__(x, y):
		if x.price == y.price:
			return x.quality > y.quality
		return x.price > y.price

def solve(n, arr):
	arr.sort()
	min_quality = 2 ** 31 + 1
	for i in arr:
		if i.quality > min_quality:
			return True
		min_quality = min(min_quality, i.quality)
	return False

def laptops(n, arr):
	if solve(n, arr) == True:
		print('Happy Alex')
	else:
		print('Poor Alex')
n = int(input())
arr = []
for i in range(n):
	(a, b) = list(map(int, input().split()))
	arr.append(laptop(a, b))
laptops(n, arr)


def inpNum():
	return int(input())

def inpNums():
	return map(int, input().split())

def inpList():
	return list(map(int, input().split()))

def solve(n):
	for i in range(n):
		(l1, l2) = inpNums()
		if l1 > l2:
			print('Happy Alex')
			return
	print('Poor Alex')
n = inpNum()
solve(n)


n = int(input())
ab = [[]] * n
for i in range(n):
	ab[i] = list(map(int, input().split()))
ab.sort(key=lambda l: l[1])
m = 0
k = 0
flag = False
for i in ab:
	if i[0] < m and k < i[1]:
		flag = True
		break
	if i[0] > m:
		m = i[0]
		k = i[1]
print('Happy Alex' if flag else 'Poor Alex')


x = int(input())
z = 0
s = 0
while z < x:
	(a, b) = map(int, input().split())
	if a != b:
		s = 1
	z += 1
if s == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


T = int(input())
while T:
	(a, b) = map(int, input().split())
	c = 0
	if b > a:
		c = 1
		break
	T -= 1
if c:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
arr = []
for i in range(n):
	(a, b) = map(int, input().split())
	arr.append((a, b))
arr = sorted(arr)
f = 0
for i in range(1, n):
	if arr[i - 1][1] > arr[i][1]:
		print('Happy Alex')
		f = 1
		break
if not f:
	print('Poor Alex')


n = int(input())
if n == 1:
	print('Poor Alex')
else:
	dict = {}
	for _ in range(n):
		num = [int(x) for x in input().split()]
		dict[num[0]] = num[1]
	price = sorted(dict.keys())
	for i in range(len(price) - 1):
		if dict[price[i]] > dict[price[i + 1]]:
			print('Happy Alex')
			break
	if dict[price[i]] <= dict[price[i + 1]]:
		print('Poor Alex')


n = int(input())
t = 0
for i in range(n):
	pq = list(map(int, input().split()))
	if pq[0] > pq[-1] or pq[-1] > pq[0]:
		t += 1
	if t >= 2:
		a = 'Happy Alex'
		break
	else:
		a = 'Poor Alex'
print(a)


from sys import stdin, stdout, setrecursionlimit
input = stdin.readline
flush = stdout.flush
OUT = []

def write(item, sep=' '):
	if type(item) is int:
		OUT.append(str(item))
	elif type(item) is list:
		if type(item[0]) is int:
			OUT.append(sep.join(map(str, item)))
		else:
			OUT.append(sep.join(item))
	else:
		OUT.append(item)

def PRINT():
	print('\n'.join(OUT))
GI = lambda : int(input())
GS = lambda : input()[:-1]
gi = lambda : list(map(int, input().split()))
gs = lambda : input().split()
n = GI()
brr = [gi() for i in range(n)]
brr.sort()
for i in range(1, n):
	if brr[i][1] < brr[i - 1][1] and brr[i][0] > brr[i - 1][0]:
		write('Happy Alex')
		break
else:
	write('Poor Alex')
PRINT()


n = int(input())
d = [[int(x) for x in input().split()] for i in range(n)]
d.sort()
for k in range(n - 1):
	if d[k][1] > d[k + 1][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
plist = []
pqual = {}
for i in range(0, n):
	line = input()
	line = line.split()
	price = int(line[0])
	quality = int(line[1])
	plist.append(price)
	pqual[price] = quality
plist.sort()
quality = pqual[plist[0]]
flag = 0
for i in range(1, n):
	nprice = plist[i]
	nqual = pqual[nprice]
	if nqual < quality:
		print('Happy Alex')
		flag = 1
		break
	else:
		quality = nqual
if flag == 0:
	print('Poor Alex')


num = int(input())
data = []
happy = False
for i in range(num):
	data.append(input().split(' '))
	data[i][0] = int(data[i][0])
	data[i][1] = int(data[i][1])
data.sort()
for i in range(len(data) - 1):
	if data[i][1] > data[i + 1][1]:
		print('Happy Alex')
		happy = True
		break
if not happy:
	print('Poor Alex')


n = int(input())
k = 0
for i in range(n):
	(a, b) = list(map(int, input().split()))
	if a == b:
		k += 1
if k == n:
	print('Poor Alex')
else:
	print('Happy Alex')


from sys import stdin, stdout
n = int(stdin.readline().strip())
lap_lst = []
for i in range(n):
	lap = list(map(int, stdin.readline().strip().split()))
	lap_lst.append(lap)
lap_lst.sort(key=lambda i: i[0])
alex = False
for i in range(n - 1):
	if lap_lst[i][1] > lap_lst[i + 1][1]:
		alex = True
		break
if alex:
	stdout.write('Happy Alex')
else:
	stdout.write('Poor Alex')


from bisect import bisect_left
n = int(input())
arr = [0] * (n + 1)
for i in range(n):
	(a, b) = map(int, input().split())
	arr[a] = b
if arr != sorted(arr):
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l = []
for _ in range(n):
	(a, b) = map(int, input().split())
	if a != b:
		print('Happy Alex')
		exit()
print('Poor Alex')


from sys import exit
from operator import itemgetter
val = int(input())
max2 = 0
array = [0 for x in range(100000 + 1)]
for i in range(val):
	strin = input()
	(a, b) = strin.split(' ')
	a = int(a)
	b = int(b)
	if array[a] < b:
		array[a] = b
	if a > max2:
		max2 = a
max1 = -1
for i in range(1, max2 + 1):
	if array[i] < max1 and array[i] > 0:
		print('Happy Alex')
		exit()
	elif array[i] > 0:
		max1 = array[i]
print('Poor Alex')
exit()


def alex(n):
	res = 'Poor Alex'
	for i in range(n):
		(a, b) = map(int, input().split())
		if a < b:
			res = 'Happy Alex'
	return res
n = int(input())
print(alex(n))


n = int(input())
res = False
for i in range(n):
	(a, b) = map(int, input().split())
	if a != b:
		res = True
		break
if res:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l = []
if n == 1:
	print('Poor Alex')
	exit(0)
for i in range(n):
	(a, b) = list(map(int, input().split()))
	l.append([a, b])
l.sort(key=lambda x: x[0])
if l[0][1] > l[1][1]:
	print('Happy Alex')
else:
	for i in range(1, n):
		if l[i][1] < l[i - 1][1]:
			print('Happy Alex')
			exit(0)
		else:
			continue
	print('Poor Alex')


import sys
Input = sys.stdin.readline
n = int(Input())
r = False
for i in range(n):
	(a, b) = map(int, Input().split())
	if b > a:
		r = True
print('Poor Alex' if not r else 'Happy Alex')


n = int(input())
x = [None] * 222222
for i in range(1, n + 1):
	(a, b) = map(int, input().split())
	x[a] = b
for i in range(1, n):
	if x[i] > x[i + 1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


st = []
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	st.append([a, b])
st.sort(key=lambda x: (x[0], x[1]))
flag = False
for i in range(1, len(st)):
	if st[i - 1][0] != st[i][0] and st[i - 1][1] > st[i][1]:
		flag = True
		break
if flag == True:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
ans = 'Poor Alex'
n = int(sys.stdin.readline())
notebooks = []
for i in range(n):
	(k, x) = map(int, sys.stdin.readline().split())
	notebooks.append([k, x])
notebooks.sort(key=lambda note: note[1])
for i in range(n - 1):
	if notebooks[i][1] != notebooks[i + 1][1]:
		if notebooks[i][0] > notebooks[i + 1][0]:
			ans = 'Happy Alex'
			break
print(ans)


n = int(input())
c = 0
for i in range(n):
	(p, q) = input().split()
	p = int(p)
	q = int(q)
	if p != q:
		c += 1
if c:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
lap = []
for i in range(n):
	(a, b) = map(int, input().split(' '))
	lap.append((b, a))
lap.sort()
happy = False
for i in range(1, n):
	if lap[i - 1][1] > lap[i][1]:
		happy = True
		break
if happy:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
c = []
for i in range(n):
	c.append([int(i) for i in input().split()])
c = sorted(c)
import sys
for i in range(len(c) - 1):
	if c[i][1] > c[i + 1][1]:
		print('Happy Alex')
		return
print('Poor Alex')


n = int(input())
answer = 'Poor Alex'
for i in range(n):
	(x, y) = map(int, input().split())
	if x != y:
		answer = 'Happy Alex'
print(answer)


n = int(input())
un = []
while n != 0:
	n -= 1
	lt = list(input().split())
	(lt[0], lt[1]) = (int(lt[0]), int(lt[1]))
	un.append(lt)
un.sort(key=lambda x: x[0])
l = len(un)
k = 0
for i in range(1, l):
	if un[i][1] < un[i - 1][1]:
		k = 1
		break
if k == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


p = 1
for i in range(int(input())):
	(k, l) = map(int, input().split())
	if k < l:
		p = 0
print(['Happy', 'Poor'][p] + ' Alex')


n = int(input())
D = []
for i in range(n):
	(a, b) = map(int, input().split())
	D.append((a, b))
D = sorted(D)
pre = 0
for i in range(n):
	if pre > D[i][1]:
		print('Happy Alex')
		exit()
	pre = D[i][1]
print('Poor Alex')


n = int(input())
c = -1
arr = []
for i in range(n):
	(x, y) = map(int, input().split())
	arr.append([x, y])
arr.sort()
a = float('inf')
b = -float('inf')
for i in range(n):
	(x, y) = (arr[i][0], arr[i][1])
	if x > a and y < b or (x < a and y > b):
		c += 1
	a = x
	b = y
if c > 0:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
n = int(input())
a = []
for i in range(n):
	(p, k) = map(int, input().split())
	a.append((p, k))
a.sort(key=lambda laptop: laptop[0])
for i in range(n - 1):
	if a[i][1] > a[i + 1][1]:
		print('Happy Alex')
		sys.exit()
print('Poor Alex')


def main():
	n = int(input())
	ip = []
	max_price = []
	max_price.append(0)
	max_price.append(0)
	for i in range(n):
		(n, k) = map(int, input().split(' '))
		if n > max_price[0]:
			max_price[0] = n
			max_price[1] = k / n
		ip.append([n, k / n])
	ip.sort(key=takeSecond, reverse=True)
	for item in ip:
		if item[0] < max_price[0] and max_price[1] < item[1]:
			print('Happy Alex')
			exit()
	print('Poor Alex')

def takeSecond(elem):
	return elem[1]
main()


n = int(input())
x = sorted([list(map(int, input().split())) for _ in range(n)])
print(['Happy Alex', 'Poor Alex'][all([x[i - 1][1] < x[i][1] for i in range(1, n)])])


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def main():
	flag = False
	n = inp()
	for _ in range(n):
		(x, y) = invr()
		if y > x:
			flag = True
	if flag:
		print('Happy Alex')
	else:
		print('Poor Alex')
main()


n = int(input())
m = []
c = 0
for i in range(n):
	(a, b) = map(int, input().split(' '))
	l = []
	l.append(a)
	l.append(b)
	m.append(l)
m.sort(key=lambda x: x[0])
for i in range(1, n):
	if m[i][1] < m[i - 1][1]:
		print('Happy Alex')
		break
	else:
		c = c + 1
if c == n - 1:
	print('Poor Alex')


n = int(input())
a = [0] * n
for i in range(n):
	(k, m) = map(int, input().split())
	a[m - 1] = k
for i in range(n - 1):
	if a[i] > 0 and a[i + 1] > 0 and (a[i] > a[i + 1]):
		print('Happy Alex')
		break
else:
	print('Poor Alex')


from sys import stdin

def main():
	l = [tuple(map(int, stdin.readline().strip().split())) for _ in range(int(stdin.readline().strip()))]
	l.sort()
	(a0, b0) = l[0]
	for (a1, b1) in l:
		if a0 < a1 and b0 > b1:
			return 'Happy Alex'
		(a0, b0) = (a1, b1)
	return 'Poor Alex'
print(main())


x = int(input(''))
v = {}
for i in range(x):
	(p, q) = [int(x) for x in input('').split()]
	v[p] = q
t = sorted(v)
u = []
for i in t:
	u.append(v[i])
cout = 0
for i in range(0, len(u) - 1):
	if u[i] > u[i + 1]:
		cout = 1
		break
if cout == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


for i in range(int(input())):
	(a, b) = input().split()
	if a != b:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


def qualityCheck(n):
	for i in range(n):
		val = input().split()
		a = int(val[0])
		b = int(val[1])
		if a != b:
			print('Happy Alex')
			return
	print('Poor Alex')
n = int(input())
qualityCheck(n)


a = int(input())
A = []
for i in range(a):
	x = input().split()
	A.append(x)
B = sorted(A, key=lambda x: x[0])
C = sorted(A, key=lambda y: y[1])
if B == C:
	print('Poor Alex')
else:
	print('Happy Alex')


z = int(input())
v = 'Poor Alex'
for i in range(z):
	x = list(map(int, input().split()))
	if x[0] < x[1]:
		v = 'Happy Alex'
		break
print(v)


import sys
from collections import defaultdict
f = sys.stdin
n = int(f.readline())
c = []
for _ in range(n):
	(a, b) = map(int, f.readline().split())
	c.append((a, b))
c.sort()
for t in range(n - 1):
	if c[t][1] > c[t + 1][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
for i in range(n):
	(ai, bi) = map(int, input().split())
	if ai != bi:
		print('Happy Alex')
		quit()
print('Poor Alex')


n = int(input())
lst = []
for i in range(n):
	a = list(map(int, input().split()))
	lst.append(a)
lst.sort()
flag = 0
j = 0
while j < n - 1:
	if lst[j][1] > lst[j + 1][1]:
		flag = 1
		break
	j += 1
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


flag = 0
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a < b:
		flag = 1
if flag == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
res = []
for i in range(n):
	res.append(list(map(int, input().split())))
res.sort(key=lambda x: (x[0], x[1]))
flag = False
for i in range(1, len(res)):
	if res[i - 1][0] < res[i][0] and res[i - 1][1] > res[i][1]:
		flag = True
		break
if flag:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = []
for i in range(n):
	(x, y) = map(int, input().split())
	a.append((x, y))
a.sort()
p = a[0][1]
for (i, j) in a:
	if j < p:
		print('Happy Alex')
		break
	p = j
else:
	print('Poor Alex')


n = int(input())
li = []
for i in range(n):
	li.append([int(x) for x in input().split()])
li.sort()
price = [x[1] for x in li]
if price == sorted(price):
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
qual = [input() for i in range(n)]
quality = []
for i in qual:
	k = i.split()
	quality.append([int(k[1]), int(k[0])])
quality.sort()
i = 0
while i < n - 1:
	if quality[i][1] < quality[i + 1][1]:
		i += 1
	else:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
m = list()
for i in range(n):
	m.append(list((int(x) for x in input().split())))
m.sort()
ok = 1
for i in range(n - 1):
	if m[i][1] > m[i + 1][1]:
		print('Happy Alex')
		ok = 0
		break
if ok == 1:
	print('Poor Alex')


def solve():
	for i in range(int(input())):
		(a, b) = map(int, input().split())
		if a != b:
			return 'Happy Alex'
	return 'Poor Alex'
print(solve())


_ = int(input())
inp = []
hapCount = 0
porCount = 0
for x in range(_):
	x = list(map(int, input().split()))
	inp.append(x)
for x in inp:
	if x[0] != x[1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


q = [[int(x) for x in input().split()] for _ in range(int(input()))]
q.sort(key=lambda x: x[1], reverse=True)
found = False
for i in range(len(q) - 1):
	temp = q[i]
	if temp[1] > q[i + 1][1] and temp[0] < q[i + 1][0]:
		found = True
		break
print(['Poor Alex', 'Happy Alex'][found])


def CF456A():
	N = int(input())
	laptops = [tuple(map(int, input().split())) for _ in range(N)]
	laptops = sorted(laptops, key=lambda x: (x[0], x[1]))
	for i in range(N - 1):
		if laptops[i][1] > laptops[i + 1][1]:
			return 'Happy Alex'
	return 'Poor Alex'
res = CF456A()
print(res)


L = []
C = 'Poor Alex'
c = 0
for i in range(int(input())):
	L.append(list(map(int, input().split())))
L.sort()
for i in range(len(L)):
	M = L[i]
	if i != len(L) - 1:
		if M[0] < L[i + 1][0] and M[1] > L[i + 1][1]:
			C = 'Happy Alex'
			break
print(C)


n = int(input())
prices = []
laptops = {}
for i in range(n):
	inp = input().split(' ')
	prices.append(int(inp[0]))
	laptops[int(inp[0])] = int(inp[1])
prices.sort()
low = laptops[prices[0]]
found = False
for i in prices:
	qual = laptops[i]
	if qual < low:
		found = True
		break
	low = qual
if found:
	print('Happy Alex')
else:
	print('Poor Alex')


for x in range(int(input())):
	(x, y) = map(int, input().split())
	if x != y:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


n = int(input())
dic = {}
arr = []
for _ in range(n):
	(a, b) = map(int, input().split())
	dic[b] = a
	arr.append(b)
arr.sort()
cur = 0
for i in arr:
	if dic[i] > cur:
		cur = dic[i]
	else:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
ab = [tuple(map(int, input().split())) for _ in range(n)]
ab.sort()
if [1 for (a, b) in zip(ab[1:], ab[:-1]) if a[1] < b[1]] != []:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
(k, l) = ([], [])
for x in range(n):
	(a, b) = map(int, input().split())
	k.append(b)
	l.append([a, b])
l.sort()
k.sort()
f = 0
for x in range(1, n):
	q = l[x][1]
	if k[x] != q:
		f = 1
		break
print(['Poor Alex', 'Happy Alex'][f == 1])


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations

def solve():
	n = int(input())
	a = []
	val = []
	for _ in range(n):
		(a, b) = map(int, input().split())
		if a != b:
			print('Happy Alex')
			exit()
	print('Poor Alex')
for _ in range(1):
	solve()


n = int(input())
ar = []
for k in range(n):
	(a, b) = map(int, input().split())
	ar.append([a, b])
ar.sort(key=lambda x: x[0])
flag = False
for i in range(n - 1):
	if ar[i][0] < ar[i + 1][0] and ar[i][1] > ar[i + 1][1]:
		flag = True
		break
if flag == True:
	print('Happy Alex')
else:
	print('Poor Alex')


number_of_laptop = int(input())
laptops = {}
for _ in range(number_of_laptop):
	laptop = list(map(int, input().split()))
	price = laptop[0]
	power = laptop[1]
	max_power = max(power, laptops.get(price, power))
	laptops[price] = max_power
max_power = float('-inf')
happy = False
for key in sorted(laptops):
	if laptops[key] < max_power:
		happy = True
		break
	else:
		max_power = max(max_power, laptops[key])
if happy:
	print('Happy Alex')
else:
	print('Poor Alex')


br = 0
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a != b:
		br = 1
		print('Happy Alex')
		break
if not br:
	print('Poor Alex')


t = 0
for v in range(int(input())):
	(c, d) = map(int, input().split())
	if c > d:
		t += 1
if t == 0:
	print('Poor Alex')
if t != 0:
	print('Happy Alex')


n = int(input())
a = [tuple(map(int, input().split())) for i in range(0, n)]
a.sort()
b = a[:]
b.sort(key=lambda x: (x[1], x[0]))
print('Happy Alex' if a != b else 'Poor Alex')


n = int(input())
Alex = False
for x in range(n):
	(price, quality) = input().split()
	if price < quality:
		Alex = True
if Alex == True:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l = []
k = []
for i in range(n):
	(a, b) = map(int, input().split())
	l.append(a)
	k.append(b)
if n == 1:
	print('Poor Alex')
else:
	flag = 0
	low = l[0]
	high = k[0]
	for i in range(1, n):
		if l[i] != k[i]:
			flag = 1
			break
	if flag == 0:
		print('Poor Alex')
	else:
		print('Happy Alex')


import sys, math, string, bisect
input = sys.stdin.readline
from collections import deque
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
n = I()
l = []
m = 10 ** 5
key = 0
for i in range(n):
	(a, b) = M()
	if a != b:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
ar = []
flag = 0

def sec(ar):
	return ar[0]
for i in range(n):
	(b, c) = map(int, input().split())
	ar += ((b, c),)
ar = sorted(ar, key=lambda ar: ar[0])
for i in range(n - 1):
	if ar[i + 1][1] < ar[i][1]:
		flag = 1
		break
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
for i in range(n):
	v = [int(i) for i in input().split()]
	if v[1] > v[0]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


l = []
n = int(input())
for u in range(n):
	d = list(map(int, input().split()))
	l.append(d)
l.sort()
f = 0
for i in range(n - 1):
	if l[i][0] < l[i + 1][0] and l[i][1] > l[i + 1][1]:
		print('Happy Alex')
		f = 1
		break
if f == 0:
	print('Poor Alex')


n = int(input())
laptops = []
for i in range(n):
	laptops.append([int(x) for x in input().split()])
laptops.sort(key=lambda laptop: laptop[0])
quality = laptops[0][1]
alex = 'Poor Alex'
for laptop in laptops[1:]:
	if laptop[1] > quality:
		quality = laptop[1]
	else:
		alex = 'Happy Alex'
		break
print(alex)


n = int(input())
ans = 'Poor Alex'
for _ in range(n):
	(a, b) = map(int, input().split())
	if b < a:
		ans = 'Happy Alex'
print(ans)


d = []
n = int(input())
for i in range(n):
	d.append(list(map(int, input().split())))
d.sort()
r = False
for i in range(n - 1):
	if d[i][1] > d[i + 1][1]:
		r = True
if r:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
L = []
for i in range(n):
	L.append(tuple(map(int, input().split())))
L = sorted(L)
f = 0
for i in range(n - 1):
	if L[i][1] > L[i + 1][1]:
		f = 1
		break
if f == 0:
	print('Poor Alex')
elif f == 1:
	print('Happy Alex')


n = int(input())
a = []
b = []
for i in range(n):
	[p, q] = list(map(int, input().split()))
	a.append(p)
	b.append(q)
ind = [i[0] for i in sorted(enumerate(a), key=lambda x: x[1])]
a = [a[i] for i in ind]
b = [b[i] for i in ind]
res = 'Poor Alex'
for i in range(n - 1):
	if b[i] > b[i + 1] and a[i] < a[i + 1]:
		res = 'Happy Alex'
		break
print(res)


i = int(input())
l = [None] * i
y = 0
while y < i:
	l[y] = [int(x) for x in input().split()]
	y += 1
l1 = sorted(l, key=lambda x: x[0])
l2 = sorted(l, key=lambda x: x[1])
if l1 != l2:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = []
for i in range(n):
	(x, y) = map(int, input().split())
	a += [(x, y)]
a.sort(key=lambda x: x[0])
mn = a[0][1]
flag = 0
for i in range(1, n):
	if a[i][1] <= mn:
		flag = 1
		break
	else:
		mn = a[i][1]
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


import io
import os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import math

def main():
	n = int(input())
	l = []
	for _ in range(n):
		(a, b) = map(int, input().split())
		l.append((a, b))
	l.sort()
	found = False
	for i in range(n - 1):
		if l[i][1] > l[i + 1][1]:
			found = True
			break
	print('Happy Alex' if found else 'Poor Alex')
main()


real = False
for i in range(int(input())):
	(fake, nope) = (int(j) for j in input().split())
	if fake < nope:
		real = True
	else:
		continue
if real:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
li = []
for i in range(n):
	(x, y) = input().split(' ')
	li.append((int(x), int(y)))
li.sort(key=lambda x: x[1])
flag = 0
for i in range(len(li) - 1):
	if li[i][0] > li[i + 1][0]:
		flag = 1
		print('Happy Alex')
		break
if flag == 0:
	print('Poor Alex')


for i in range(int(input())):
	(a, b) = map(int, input().split())
	if b > a:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


lst = list(map(int, input().split()))
n = lst[0]
price = []
quality = []
data = {}
for i in range(0, n):
	x = list(map(int, input().split()))
	data[x[0]] = x[1]
last = -1
for key in sorted(data):
	if last > data[key]:
		print('Happy Alex')
		return
	last = data[key]
print('Poor Alex')


a = int(input())
alex = False
for i in range(a):
	(price, quality) = input().split()
	if price < quality:
		alex = True
if alex:
	print('Happy Alex')
else:
	print('Poor Alex')


def Q2():
	import sys
	import collections
	n = int(sys.stdin.readline())
	h = False
	for i in range(n):
		[a, b] = [int(j) for j in sys.stdin.readline().split()]
		if a != b:
			h = True
			break
	print('Happy Alex') if h else print('Poor Alex')
Q2()


n = int(input())
m = [100000] * 100005
c = [0] * 100005
for i in range(n):
	(a, b) = map(int, input().split())
	if m[a] > b:
		m[a] = b
	c[a] = 1
d = []
for i in range(1, 100005):
	if c[i] == 1:
		d.append(m[i])
t = True
for i in range(1, len(d)):
	if d[i] < d[i - 1]:
		t = False
if not t:
	print('Happy Alex')
else:
	print('Poor Alex')


class Laptop:

	def __init__(self, price, quality):
		self.price = price
		self.quality = quality

def custom_key(obj):
	return obj.price
n = int(input())
laptops = []
for i in range(n):
	(price, quality) = map(int, input().split())
	laptops.append(Laptop(price, quality))
found = False
laptops.sort(key=custom_key)
for i in range(n - 1):
	if laptops[i].price != laptops[i + 1].price and laptops[i].quality > laptops[i + 1].quality:
		print('Happy Alex')
		found = True
		break
if not found:
	print('Poor Alex')


import sys
n = int(input())
v = []
for i in range(n):
	v.append(list(map(int, input().split())))
v.sort()
for i in range(n - 1):
	if v[i + 1][1] < v[i][1]:
		print('Happy Alex')
		return
print('Poor Alex')


n = int(input())
mas = []
for i in range(n):
	mas.append(list(map(int, input().split())))
mas = sorted(mas)
for i in range(1, n):
	if mas[i][1] < mas[i - 1][1]:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


x = int(input())
t = []
for i in range(x):
	s = [int(i) for i in input().split()]
	t.append(s)
t.sort()
t.reverse()
b = 0
for i in range(x - 1):
	a = t[i][1]
	if t[i + 1][1] > a:
		b = 1
		break
if b == 0:
	print('Poor Alex')
elif b == 1:
	print('Happy Alex')


q = []
n = int(input())
x = {}
y = []
for i in range(n):
	(a, b) = map(int, input().split())
	x[a] = b
l = sorted(x.keys())
for each in l:
	q.append(x[each])
for each in q:
	y.append(each)
y.sort()
if y == q:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
v = dict()
l = []
for i in range(n):
	l = [int(i) for i in input().split(' ')]
	if l[0] != l[1]:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


n = int(input())
count = 0
for i in range(n):
	x = [int(x) for x in input().split()]
	if x[0] == x[1]:
		count = count + 1
if count == n:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
f = False
for i in range(n):
	(x, y) = input().split()
	if x != y:
		f = True
if f:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
br = 1
for i in range(0, n):
	(a, b) = [int(i) for i in input().split()]
	if a != b:
		br = 0
if br:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
a = []
k = 0
for i in range(n):
	x = list(map(int, input().split()))
	a.append(x)
a.sort()
for p in range(len(a) - 1):
	if a[p][0] < a[p + 1][0] and a[p][1] > a[p + 1][1]:
		print('Happy Alex')
		break
	elif p == len(a) - 2:
		print('Poor Alex')
if n == 1:
	print('Poor Alex')


n = int(input())
a = []
for i in range(n):
	(u, v) = map(int, input().split())
	a.append((u, v))
a.sort()
i = 0
l = 0
while i < n - 1:
	if a[i][0] < a[i + 1][0] and a[i][1] > a[i + 1][1]:
		l = 1
		break
	i += 1
if l == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = []
for i in range(n):
	a.append(list(map(int, input().split())))
	if a[i][0] > a[i][1] or a[i][0] < a[i][1]:
		print('Happy Alex')
		break
	elif i == n - 1:
		print('Poor Alex')


N = int(input())
laptops = []
for i in range(N):
	string = input()
	string.strip()
	string += ' '
	current = []
	current_st = ''
	for char in string:
		if char != ' ':
			current_st += char
		else:
			current.append(int(current_st))
			current_st = ''
	laptops.append(current)
laptops.sort()
isReverse = False
for i in range(N - 1):
	if laptops[i + 1][1] < laptops[i][1]:
		isReverse = True
		print('Happy Alex')
		break
if isReverse == False:
	print('Poor Alex')


n = int(input())
(mind, maxd) = (dict(), dict())
s = set()
for i in range(n):
	(a, b) = map(int, input().split())
	s.add(a)
	if a not in mind.keys():
		mind[a] = b
	else:
		mind[a] = min(b, mind[a])
	if a not in maxd.keys():
		maxd[a] = b
	else:
		maxd[a] = max(b, maxd[a])
s = list(s)
s = sorted(s)
maxvalue = -1
result = False
for i in range(len(s)):
	if maxvalue > -1:
		if mind[s[i]] < maxvalue:
			result = True
			break
	if maxd[s[i]] > maxvalue:
		maxvalue = maxd[s[i]]
if result:
	print('Happy Alex')
else:
	print('Poor Alex')


print(['Poor', 'Happy'][any((a != b for (a, b) in (input().split() for i in range(int(input())))))], 'Alex')


n = int(input())
(listab, c) = ([], 0)
for i in range(n):
	(a, b) = map(int, input().split())
	listab.append((a, b))
listab.sort()
for i in range(n - 1):
	if listab[i][0] < listab[i + 1][0] and listab[i][1] > listab[i + 1][1]:
		print('Happy Alex')
		c = 1
		break
if c == 0:
	print('Poor Alex')


n = int(input())
arr = []
for i in range(n):
	(a, b) = map(int, input().split())
	arr.append((a, b))
arr.sort()
boo = True
for i in range(n - 1):
	if arr[i][1] > arr[i + 1][1]:
		print('Happy Alex')
		boo = False
		break
if boo:
	print('Poor Alex')


n = int(input())
L = [0] * (n + 1)
for k in range(n):
	(a, b) = map(int, input().split())
	L[a] = b

def s(L, n):
	for k in range(n):
		if L[k] > L[k + 1]:
			return 'Happy Alex'
	return 'Poor Alex'
print(s(L, n))


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	n = I()
	arr = []
	for i in range(n):
		(a, b) = In()
		arr.append((a, b))
	arr.sort()
	flag = 0
	for i in range(1, n):
		if arr[i - 1][1] > arr[i][1]:
			flag = 1
			break
	if flag:
		print('Happy Alex')
	else:
		print('Poor Alex')
main()


laptops = []
flag = False
n = int(input())
for _ in range(n):
	(a, b) = map(int, input().split())
	laptops.append((a, b))
laptops.sort(key=lambda t: t[0], reverse=True)
for i in range(n - 1):
	if laptops[i][1] < laptops[i + 1][1]:
		flag = True
		break
print('Happy Alex' if flag else 'Poor Alex')


def epic_game():
	alex = False
	for i in range(int(input())):
		a = list(map(int, input().split()))
		if a[0] < a[1]:
			alex = True
	if alex:
		print('Happy Alex')
	else:
		print('Poor Alex')
epic_game()


import sys
n = int(input())
v = []
for i in range(0, n):
	(a, b) = map(int, input().split())
	v.append({'a': a, 'b': b})
v.sort(key=lambda x: x['a'])
for i in range(n - 1):
	if v[i]['a'] < v[i + 1]['a'] and v[i]['b'] > v[i + 1]['b']:
		print('Happy Alex')
		exit()
print('Poor Alex')


from collections import defaultdict
n = int(input())
d = defaultdict(int)
for i in range(n):
	(a, b) = map(int, input().split())
	d[a] = max(d[a], b)
m = 0
s = 'Poor Alex'
for (a, b) in sorted(d.items(), key=lambda x: x[0]):
	if b < m:
		s = 'Happy Alex'
		break
	else:
		m = b
print(s)


n = int(input())
lst = [tuple(map(int, input().split())) for _ in range(n)]
lst.sort(key=lambda x: x[0])
for i in range(n - 1):
	if lst[i][1] > lst[i + 1][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
j = 0
arr = []
m = 0
for i in range(n):
	d = [int(x) for x in input().split()]
	arr.append(d)
for i in range(n):
	if arr[i][j] < arr[i][j + 1]:
		m = m + 1
if m != 0:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = []
for i in range(n):
	a.append(list(map(int, input().split())))
a.sort()
for i in range(len(a) - 1):
	if a[i][1] > a[i + 1][1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


s = []
n = int(input())
for _ in [0] * n:
	s.append([int(i) for i in input().split()])
s.sort()
for i in range(n - 1):
	if s[i][1] > s[i + 1][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


import sys
n = int(input())
l = []
for i in range(n):
	(a, b) = map(int, sys.stdin.readline().split())
	l.append((a, b))
l.sort(key=lambda x: x[0])
happy = False
for i in range(1, n):
	if l[i][1] < l[i - 1][1]:
		happy = True
		break
if happy:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
x = 'Poor Alex'
for i in range(n):
	(l, r) = map(int, input().split())
	if l < r:
		x = 'Happy Alex'
print(x)


n = int(input())
a = []
b = []
count = 0
count1 = 0
for i in range(n):
	(c, d) = [int(item) for item in input().split()]
	a.append(c)
	b.append(d)
for i in range(n):
	if a[i] > b[i]:
		count += 1
	elif a[i] < b[i]:
		count1 += 1
if count >= 1 and count1 >= 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l = []
for i in range(n):
	(a, b) = map(int, input().split())
	l.append((a, b))
l.sort(key=lambda tup: tup[0], reverse=True)
minq = 999999
h = False
lastp = 0
for (_, (p, q)) in enumerate(l):
	if q > minq and p < lastp:
		h = True
	lastp = p
	minq = min(q, minq)
print('Happy Alex') if h else print('Poor Alex')


n = int(input())
a = []
for _ in range(n):
	(u, v) = map(int, input().split())
	a.append((u, v))
a.sort()
i = 0
found = False
while i < n - 1:
	if a[i][0] < a[i + 1][0] and a[i][1] > a[i + 1][1]:
		found = True
		break
	i += 1
if found:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
happy = False
for _ in range(n):
	(a, b) = map(int, input().split())
	if a != b:
		happy = True
		break
print('Happy Alex' if happy else 'Poor Alex')


n = int(input())
a = []
for i in range(n):
	a.append(list(map(int, input().split())))
a.sort(key=lambda x: x[0])
happy = False
for i in range(1, n):
	if a[i][1] < a[i - 1][1]:
		happy = True
print(('Happy' if happy else 'Poor') + ' Alex')


n = int(input())
s = []
for i in range(n):
	(ta, tb) = map(int, input().split())
	s.append([ta, tb])
s.sort(key=lambda x: x[0])
for i in range(n - 1):
	if s[i][1] > s[i + 1][1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


(a, x) = (int(input()), 0)
for i in range(a):
	(m, n) = map(int, input().split())
	if m != n:
		x = 1
if x:
	print('Happy Alex')
else:
	print('Poor Alex')


ctr1 = 0
ctr2 = 0
msg = 'Poor Alex'
n = int(input())
for _ in range(n):
	(a, b) = list(map(int, input().split()))
	if b > a or b > a:
		msg = 'Happy Alex'
		break
print(msg)


n = int(input())
a = []
c = 0
for i in range(n):
	a.append([])
	b = input().split(' ')
	for j in range(2):
		a[i].append(int(b[j]))
a = sorted(a)
for i in range(n - 1):
	if a[i][1] > a[i + 1][1]:
		c = 1
		break
if c == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


from sys import stdin
n = int(stdin.readline())
d = {}
for _ in range(n):
	(a, b) = map(int, stdin.readline().split())
	d[a] = b
d = dict(sorted(d.items()))
m = list(d.values())
if m == sorted(m):
	print('Poor Alex')
else:
	print('Happy Alex')


def laptop(a):
	b = sorted(a)
	a = sorted(zip(a.values(), a.keys()))
	c = list(zip(*a))
	c = list(c[1])
	if b == c:
		print('Poor Alex')
	else:
		print('Happy Alex')
n = int(input())
a = {}
for i in range(n):
	d = list(map(int, input().split()))
	a[d[0]] = d[1]
laptop(a)


n = int(input())
c = 'Poor Alex'
while n > 0:
	(a, b) = map(int, input().split())
	if b > a:
		c = 'Happy Alex'
	n -= 1
print(c)


a = int(input())
li2 = [0] * a
for i in range(a):
	li2[i] = list(map(int, input().split()))
li2.sort()
count = 0
for i in range(a - 1):
	count += li2[i][1] > li2[i + 1][1]
print('Happy Alex' if count != 0 else 'Poor Alex')


n = int(input())
p = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a != b:
		print('Happy Alex')
		quit()
print('Poor Alex')


n = int(input())
pq = []
for _ in range(n):
	pq.append(list(map(int, input().split())))
pq.sort(key=lambda r: r[0])
l = [pq[0][1]]
for i in range(1, n):
	l.append(max(l[-1], pq[i][1]))
	if l[-2] > pq[i][1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


f = 0
ls = []
n = int(input())
for i in range(n):
	(p, q) = map(int, input().split())
	ls.append((p, q))
ls.sort(key=lambda tup: tup[0])
for i in range(len(ls) - 1):
	if ls[i][1] > ls[i + 1][1]:
		print('Happy Alex')
		f = 1
		break
if not f:
	print('Poor Alex')


def laptops(n):
	l = []
	for _ in range(n):
		(p, q) = [int(i) for i in input().split()]
		l.append({'Price': p, 'Quality': q})
	l = sorted(l, key=lambda x: x['Price'])
	Quality = [i['Quality'] for i in l]
	if sorted(Quality) != Quality:
		return 'Happy Alex'
	return 'Poor Alex'
n = int(input())
print(laptops(n))


import math
import sys
n = int(input())
d = []
for i in range(n):
	(a, b) = map(int, input().split())
	d.append([a, b])
d.sort()
print('Happy Alex') if any((d[i][1] > d[i + 1][1] for i in range(n - 1))) else print('Poor Alex')


n = int(input())
s = [[int(x) for x in input().split()] for _ in range(n)]
s.sort(reverse=True)
for i in s[1:]:
	if i[1] > s[0][1]:
		print('Happy Alex')
		break
	s[0][1] = i[1]
else:
	print('Poor Alex')


n = int(input())
lDict = {}
pList = []
qList = []
for i in range(n):
	(a, b) = map(int, input().split())
	lDict[a] = b
	pList.append(a)
	qList.append(b)
pList.sort(reverse=True)
qList.sort(reverse=True)
for i in range(n):
	if lDict[pList[i]] < qList[i]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
x = []
for i in range(n):
	(a, b) = map(int, input().split())
	x.append([a, b])
x = sorted(x)
status = False
for i in range(1, len(x)):
	if x[i][1] < x[i - 1][1]:
		status = True
		break
if status:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
laptops = []
for i in range(n):
	(a, b) = map(int, input().split())
	laptops.append((a, b))
laptops.sort()
max_q = laptops[0][1]
r = False
for i in range(n):
	if laptops[i][1] < max_q:
		r = True
		break
	else:
		max_q = laptops[i][1]
print('Happy Alex') if r else print('Poor Alex')


n = int(input())
c = 0
lap = {}
for i in range(n):
	(x, y) = map(int, input().split())
	lap[x] = y
d = dict(sorted(lap.items()))
for v in d.values():
	if v < c:
		print('Happy Alex')
		exit()
	c = v
print('Poor Alex')
exit()
for i in range(n):
	(p, q) = map(int, input().split())
	s.append(p)
	z.append(q)
z.sort()
for i in range(len(z) - 1):
	if z[i] > z[i + 1]:
		print('Poor Alex')
		exit()
print('Happy Alex')
exit()
if (len(s) == 0) | (c == n):
	print('Poor Alex')
	exit()
if len(s) == 1:
	if z[0] > s[0]:
		print('Happy Alex')
		exit()
mn = min(s)
mx = max(s)
for i in range(len(s)):
	if s[i] == mn:
		qn = z[i]
	if s[i] == mx:
		qm = z[i]
if qn < qm:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
d = dict()
for i in range(n):
	l = list(map(int, input().split()))
	d[l[0]] = l[1]
c = 0
d2 = sorted(d.items(), key=lambda kv: (kv[1], kv[0]))
d1 = sorted(d.items())
if d1 == d2:
	print('Poor Alex')
else:
	print('Happy Alex')


def main():
	n = int(input())
	laptops = []
	for _ in range(n):
		laptop = [int(elem) for elem in input().split()]
		laptops.append(laptop)
	laptops.sort()
	happy = False
	for i in range(n - 1):
		if laptops[i][1] > laptops[i + 1][1]:
			happy = True
			break
	print('Happy Alex' if happy else 'Poor Alex')
main()


n = int(input())
laptops = []
for i in range(n):
	(ai, bi) = map(int, input().split())
	laptops.append((bi, ai))
laptops = sorted(laptops, reverse=True)
price = 1061109567
for c in laptops:
	if c[1] > price:
		print('Happy Alex')
		quit()
	else:
		price = c[1]
print('Poor Alex')


n = int(input())
a = []
for i in range(0, n):
	(x, y) = map(int, input().split())
	a.append((x, y))
a.sort()
b = []
ans = True
for i in range(0, n):
	b.append(a[i][1])
c = b.copy()
c.sort()
for i in range(0, n):
	if b[i] != c[i]:
		ans = False
		break
if ans:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
(a, c) = ([], 0)
for i in range(n):
	b = list(map(int, input().split()))
	ratio = b[1] / b[0]
	b.append(ratio)
	b.reverse()
	a.append(b)
a.sort()

def com(a):
	(i, j) = (0, len(a) - 1)
	c = 1
	while i < n:
		while j > i:
			if a[i][1] < a[j][1] and a[i][2] > a[j][2]:
				c += 1
				return 'Happy Alex'
			else:
				j -= 1
		i += 1
	if c == 1:
		return 'Poor Alex'
print(com(a))


n = int(input())
x = []
ans = 0
for item in range(n):
	x = [int(a) for a in input().split()]
	if x[0] == x[1]:
		ans = ans + 1
	else:
		pass
if ans == n:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
x = []
f = 0
for _ in range(n):
	l = tuple(map(int, input().split()))
	x.append(l)
a = sorted(x, key=lambda x: x[0])
b = sorted(x, key=lambda x: x[1])
for i in range(len(a)):
	if a[i] != b[i]:
		f = 1
		break
if f == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


d = []
s = 0
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	d.append([a, b])
d.sort(key=lambda i: i[0], reverse=True)
for i in range(len(d) - 1):
	if d[i][0] > d[i + 1][0] and d[i][1] < d[i + 1][1]:
		print('Happy Alex')
		s = 1
		break
if s != 1:
	print('Poor Alex')


n = int(input())
p = sorted([list(map(int, input().split())) for x in range(n)])
if p == sorted(p, key=lambda p: p[1]):
	print('Poor Alex')
else:
	print('Happy Alex')


import os, sys, atexit
from io import BytesIO, StringIO
input = BytesIO(os.read(0, os.fstat(0).st_size)).readline
_OUTPUT_BUFFER = StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
n = int(input())
l = []
for i in range(n):
	(a, b) = [int(x) for x in input().split()]
	l.append([a, b])
l.sort()
c = 0
for i in range(n - 1):
	if l[i][1] > l[i + 1][1]:
		c = 1
		break
if c:
	print('Happy Alex')
else:
	print('Poor Alex')


def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
import math
for _ in range(1):
	n = ii()
	l = []
	l1 = []
	for i in range(n):
		(a, b) = mi()
		if a < b:
			print('Happy Alex')
			exit()
	print('Poor Alex')


num_laptops = int(input())
laptops = []
for _ in range(num_laptops):
	(price, quality) = [int(a) for a in input().strip().split()]
	laptops.append((price, quality))
laptops.sort()
qualities = []
for (price, quality) in laptops:
	qualities.append(quality)
alex = False
curr_min = -float('inf')
for quality in qualities:
	if quality <= curr_min:
		alex = True
		break
	curr_min = quality
if alex:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = []
b = []
c = 0
for i in range(n):
	(x, y) = map(int, input().split())
	a.append(x)
	b.append(y)
for i in range(n):
	if a[i] != b[i]:
		c += 1
if c > 0:
	print('Happy Alex')
else:
	print('Poor Alex')


def main():
	n = int(input())
	for i in range(0, n):
		(a, b) = list(map(int, input().split()))
		if a != b:
			print('Happy Alex')
			return
	print('Poor Alex')
main()


n = int(input())
lis = []
for i in range(n):
	lis.append(input().split())
for i in range(n):
	for j in range(2):
		lis[i][j] = int(lis[i][j])
lis.sort()
check = 0
for i in range(n - 1):
	if lis[i][1] > lis[i + 1][1]:
		check = 1
if check == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


def go():
	n = int(input())
	for i in range(n):
		(p, q) = [int(i) for i in input().split(' ')]
		if p != q:
			return 'Happy Alex'
	return 'Poor Alex'
print(go())


n = int(input())
laptops = []
for i in range(n):
	laptops.append(list(map(int, input().split())))
laptops.sort()
for j in range(n - 1):
	if laptops[j][0] < laptops[j + 1][0] and laptops[j][1] > laptops[j + 1][1]:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


z = int(input())
alex = 0
for i in range(z):
	(a, b) = list(map(int, input().strip().split()))
	if b > a:
		alex += 1
if alex >= 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
arr = []
for i in range(n):
	(x, y) = map(int, input().split())
	arr.append([x, y])
arr.sort(key=lambda x: x[0])
happyAlex = False
for i in range(n - 1):
	if arr[i][1] > arr[i + 1][1]:
		happyAlex = True
		break
if happyAlex:
	print('Happy Alex')
else:
	print('Poor Alex')


boolean = True
qtd = int(input())
laptops = []
for i in range(qtd):
	laptops.append(tuple([int(x) for x in input().split()]))
laptops.sort()
first = laptops[0][0] - laptops[0][1]
for i in range(1, qtd):
	val = laptops[i][0] - laptops[i][1]
	if val <= first:
		first = val
	else:
		boolean = False
		break
if boolean:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
if n == 1:
	(a, b) = map(int, input().split())
	print('Poor Alex')
else:
	x = [0] * n
	for i in range(n):
		x[i] = [0] * 2
		(x[i][0], x[i][1]) = map(int, input().split())
	x.sort()
	ans = False
	for i in range(1, n):
		if x[i][1] < x[i - 1][1]:
			ans = True
			break
	if ans == True:
		print('Happy Alex')
	else:
		print('Poor Alex')


n = int(input())
data = []
for i in range(n):
	line = input().split()
	data.append([int(line[0]), int(line[1])])
data.sort(key=lambda x: x[0])
happy = False
for i in range(1, len(data)):
	if data[i][1] < data[i - 1][1]:
		happy = True
if happy:
	print('Happy Alex')
else:
	print('Poor Alex')


def read():
	n = int(input())
	a = []
	for i in range(n):
		(c, q) = map(int, input().split())
		a.append((c, q))
	return (n, a)

def solve(n, a):
	a.sort(key=lambda laptop: laptop[0])
	curr_price = a[0][0]
	top_quality = a[0][1]
	for i in range(1, n):
		(price, quality) = a[i]
		if price == curr_price:
			top_quality = max(top_quality, quality)
		elif quality < top_quality:
			return True
		else:
			curr_price = price
			top_quality = max(top_quality, quality)
	return False
result = solve(*read())
print('Happy Alex' if result else 'Poor Alex')


n = int(input())
arr = []
for _ in range(n):
	tmp = [int(x) for x in input().split()]
	arr.append(tmp)
arr.sort()
was = False
prev = arr[0][1]
i = 1
while i < n:
	if prev > arr[i][1]:
		was = True
	prev = arr[i][1]
	i += 1
if was:
	print('Happy Alex')
else:
	print('Poor Alex')


t = int(input())
f = 0
for i in range(t):
	x = input().split()
	if x[0] > x[1]:
		f = 1
if f == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
data = [[int(i) for i in input().split()] for i in range(n)]
data = sorted(data)
ans = 'Poor Alex'
for i in range(n - 1):
	if data[i][1] > data[i + 1][1]:
		ans = 'Happy Alex'
		break
print(ans)


import sys
n = int(input())
l1 = []
d1 = {}
d2 = {}
for i in range(n):
	(a, b) = map(int, input().split())
	if a in d1:
		d1[a] = max(d1[a], b)
	else:
		d1[a] = b
	if a in d2:
		d1[a] = min(d1[a], b)
	else:
		d1[a] = b
for k in d1:
	l1.append((k, d1[k]))
for k in d2:
	l1.append((k, d1[k]))
l1.sort()
for i in range(len(l1) - 1):
	if l1[i + 1][1] < l1[i][1]:
		print('Happy Alex')
		sys.exit()
print('Poor Alex')


from sys import stdin, stdout
import bisect

def st():
	return list(stdin.readline())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
			n = n - 1
		else:
			a = a * a
			n = n >> 1
	return r

def solve():
	n = inp()
	c = 0
	for i in range(n):
		(a, b) = mp()
		if a != b:
			c = 1
	if c:
		pr('Happy Alex')
	else:
		pr('Poor Alex')
solve()


n = int(input())
a = []
for i in range(n):
	(x, y) = map(int, input().split())
	a.append([x, y])
a.sort()
Rasmige = True
for i in range(n - 1):
	if a[i][0] != a[i + 1][0] and a[i][1] > a[i + 1][1]:
		Rasmige = False
		break
if Rasmige:
	print('Poor Alex')
else:
	print('Happy Alex')


from sys import stdin
size = input()
laptops = stdin.readlines()
lArray = []
for l in laptops:
	(cost, quality) = map(int, l.split())
	lArray.append((cost, quality))
costSorted = sorted(lArray)
lArray.sort(key=lambda x: x[1])
print('Poor Alex' if costSorted == lArray else 'Happy Alex')


n = int(input())
l = []
for i in range(n):
	(a, b) = map(int, input().split())
	l.append([a, b])
l = sorted(l, key=lambda x: x[0])
flag = False
for i in range(1, n):
	if l[i - 1][1] > l[i][1] and l[i - 1][0] != l[i][0]:
		flag = True
		break
if flag:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
count = bool()
for i in range(n):
	(a, b) = list(map(int, input().split()))
	if a > b:
		count = True
if count:
	print('Happy Alex')
else:
	print('Poor Alex')


from operator import itemgetter

def isSorted(lis, key):
	a = len(lis)
	for i in range(0, a - 1):
		if lis[i][key] <= lis[i + 1][key]:
			continue
		else:
			return False
	return True
m = int(input())
l = []
for i in range(0, m):
	(a, b) = map(int, input().split())
	pair = (a, b)
	l.append(pair)
l.sort(key=itemgetter(0))
if isSorted(l, 1):
	print('Poor Alex')
else:
	print('Happy Alex')


price_laptop = []
quality_laptop = []
n = int(input())
for _ in range(n):
	(price, quality) = map(int, input().split())
	price_laptop.append(price)
	quality_laptop.append(quality)
lap_dict = dict(zip(price_laptop, quality_laptop))
flage = 0
for i in range(1, n):
	if lap_dict[i] > lap_dict[i + 1]:
		flage = 1
		break
if flage == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


t = int(input())
a = []
b = []
for _ in range(t):
	(x, y) = list(map(int, input().split()))
	a.append(x)
	b.append(y)
d = sorted(zip(a, b))
b = [i for (j, i) in d]
c = 0
for i in range(len(b) - 1):
	if b[i + 1] < b[i]:
		print('Happy Alex')
		c += 1
		break
if c == 0:
	print('Poor Alex')


n = int(input())
arr = []
for i in range(n):
	tup = list(map(int, input().split()))
	arr.append(tup)
arr.sort(key=lambda arr: arr[0])
for i in range(n - 1):
	if arr[i][1] > arr[i + 1][1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
l = [list(map(int, input().split())) for _ in range(n)]
print('Happy Alex' if any((x < y for (x, y) in l)) else 'Poor Alex')


n = int(input())
a = sorted((tuple(map(int, input().split())) for _ in range(n)))
b = [x[1] for x in a]
for i in range(n - 1, 0, -1):
	b[i - 1] = min(b[i - 1], b[i])
for i in range(n - 1):
	if a[i][1] > b[i + 1]:
		print('Happy Alex')
		return
print('Poor Alex')


from operator import itemgetter
x = int(input())
i = 0
lst = []
while i < x:
	(first, second) = input().split()
	first = int(first)
	second = int(second)
	lst.append([first, second])
	i += 1
lst.sort(key=lambda j: j[0])
i = 0
isHappy = False
while i < x - 1:
	if lst[i][0] < lst[i + 1][0] and lst[i][1] > lst[i + 1][1]:
		isHappy = True
	i += 1
if isHappy:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l = sorted([list(map(int, input().rstrip().split())) for _ in range(n)])
print(['Happy Alex', 'Poor Alex'][l == sorted(l, key=lambda x: x[1])])


n = int(input())
happy = False
lap_list = []
for _ in range(n):
	(ai, bi) = tuple(map(int, input().split()))
	lap_list.append((ai, bi))
lap_list.sort()
(prev_price, prev_quality) = lap_list[0]
for i in range(1, n):
	if lap_list[i][1] < prev_quality:
		print('Happy Alex')
		break
	(prev_price, prev_quality) = lap_list[i]
else:
	print('Poor Alex')


specs = {}
t = int(input())
for i in range(t):
	(p, s) = map(int, input().split())
	specs[i] = (p, s)
flag = 0
for i in range(1, t):
	if specs[i][0] > specs[i - 1][0] and specs[i][1] < specs[i - 1][1] or (specs[i][0] < specs[i - 1][0] and specs[i][1] > specs[i - 1][1]):
		flag = 1
		break
if flag:
	print('Happy Alex')
else:
	for k in range(2, i + 1):
		if specs[i][0] > specs[i - k][0] and specs[i][1] < specs[i - k][1] or (specs[i][0] < specs[i - k][0] and specs[i][1] > specs[i - k][1]):
			flag = 1
			break
	if flag:
		print('Happy Alex')
	else:
		print('Poor Alex')


n = int(input())
laptops = []
for i in range(n):
	laptops.append(tuple(map(int, input().strip().split())))
byPrice = sorted(laptops)
byQuality = sorted(laptops, key=lambda x: x[1])
if byPrice == byQuality:
	print('Poor Alex')
else:
	print('Happy Alex')


t = int(input())
l = []
for i in range(t):
	n = input().split()
	n = list(map(int, n))
	l.append(n)
l.sort()
if t == 1:
	print('Poor Alex')
else:
	for j in range(1, len(l)):
		if l[j][1] < l[j - 1][1]:
			print('Happy Alex')
			break
		elif j == len(l) - 1:
			print('Poor Alex')


n = int(input())
z = []
for _ in range(n):
	(a, b) = map(int, input().split())
	z.append((a, b))
quality = [x for (_, x) in sorted(z)]
maxi = quality[0]
for x in quality:
	if x < maxi:
		print('Happy Alex')
		break
	else:
		maxi = x
else:
	print('Poor Alex')


n = int(input())
s = [0] * (n + 1)
for i in range(n):
	(a, b) = map(int, input().split())
	if s[a] == 0:
		s[a] = [b]
	else:
		s[a] = s[a] + [b]
f = 0
for i in range(1, n):
	if max(s[i]) > min(s[i + 1]):
		print('Happy Alex')
		break
	else:
		f += 1
if f == n - 1:
	print('Poor Alex')


n = input()
laptops = []
for z in range(int(n)):
	laptop = dict()
	(laptop['price'], laptop['quality']) = map(int, input().split(' '))
	laptops.append(laptop)
laptops.sort(key=lambda k: (k['price'], k['quality']))
laptops_copy = list(laptops)
laptops_copy.sort(key=lambda k: (k['quality'], k['price']))
if laptops == laptops_copy:
	print('Poor Alex')
else:
	print('Happy Alex')


import sys
from operator import itemgetter

def solve(price, quality, length):
	laptops = []
	for i in range(0, length):
		node = (price[i], quality[i])
		laptops.append(node)
	laptops = sorted(laptops, key=itemgetter(0))
	p = laptops[0][0]
	q = laptops[0][1]
	for i in range(1, length):
		p_ = laptops[i][0]
		q_ = laptops[i][1]
		if p_ > p and q > q_:
			print('Happy Alex')
			return
		p = p_
		q = q_
	print('Poor Alex')
length = int(sys.stdin.readline().strip())
price = []
quality = []
for line in sys.stdin:
	ln = line.strip()
	(a, b) = [int(n) for n in ln.split()]
	price.append(a)
	quality.append(b)
solve(price, quality, length)


n = int(input())
y = []
for _ in range(n):
	(a, b) = map(int, input().split(' '))
	y.append([a, b])
y = sorted(y)
i = 1
flag = 0
while i < n:
	if y[i][0] > y[i - 1][0]:
		if y[i][1] < y[i - 1][1]:
			flag = 1
			break
	i += 1
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


def notes(lst):
	for elem in lst:
		if elem[0] != elem[1]:
			return 'Happy Alex'
	return 'Poor Alex'
n = int(input())
a = list()
for i in range(n):
	(s, t) = [int(j) for j in input().split()]
	a.append([s, t])
print(notes(a))


n = int(input())
A = [[int(s) for s in input().split()] for i in range(n)]
A = sorted(A, key=lambda x: x[0])
B = [x[1] for x in A]
C = sorted(B)
if C == B:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
a = []
b = []
for x in range(n):
	s = input().split(' ')
	a.append(int(s[0]))
	b.append(int(s[1]))
for x in range(n):
	if a[x] != b[x]:
		print('Happy Alex')
		exit()
print('Poor Alex')


def main():
	n = int(input())
	d = {}
	for ii in range(n):
		(p, q) = map(int, input().split())
		d[p] = q
	pp = sorted(d.keys())
	c = 0
	for i in range(1, len(pp)):
		if d[pp[i]] < d[pp[i - 1]]:
			c = 1
			break
	if c == 1:
		print('Happy Alex')
	else:
		print('Poor Alex')
main()


dict1 = {}
n = 0
q = 0
count = 0
for t in range(int(input())):
	n1 = n
	q1 = q
	(n, q) = map(int, input().split())
	dict1[n] = q
	if n > n1 and q < q1 and (count == 0):
		count = 1
		print('Happy Alex')
if count == 0:
	l1 = sorted(dict1.keys())
	for t in range(len(dict1)):
		if t == 0:
			continue
		if dict1[l1[t]] < dict1[l1[t - 1]] and count == 0:
			count = 1
			print('Happy Alex')
if count == 0:
	print('Poor Alex')


def sortSecond(val):
	return val[0]
l = []

def f(l):
	for i in l:
		if i[0] < i[1]:
			return 'Happy Alex'
	return 'Poor Alex'
for i in range(int(input())):
	(n, k) = map(int, input().split())
	l.append([n, k])
l.sort(key=sortSecond)
print(f(l))


n = int(input())
a = []
for i in range(n):
	(c, d) = map(int, input().split())
	a.append([c, d])
a.sort()
f = 1
for i in range(n - 1):
	if a[i + 1][1] < a[i][1]:
		f = 0
		break
if f == 1:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())

def getKey(item):
	return item[0]
M = []
for i in range(n):
	L = list(map(int, input().split()))
	M.append(L)
M = sorted(M, key=getKey)
i = 0
while i + 1 < n and M[i][1] < M[i + 1][1]:
	i = i + 1
if i == n - 1:
	print('Poor Alex')
else:
	print('Happy Alex')


c = False
for i in range(int(input())):
	(a, b) = (int(j) for j in input().split())
	if a < b:
		c = True
	else:
		continue
if c:
	print('Happy Alex')
else:
	print('Poor Alex')


f = 0
for i in range(int(input())):
	(a, b) = [int(x) for x in input().rstrip().split()]
	if a != b:
		print('Happy Alex')
		f = 1
		break
if f == 0:
	print('Poor Alex')


def quickSort(a, l, r, b):
	i = l
	j = r
	mid = a[int((l + r) / 2)]
	while i <= j:
		while a[i] < mid:
			i += 1
		while a[j] > mid:
			j -= 1
		if i <= j:
			(a[i], a[j]) = (a[j], a[i])
			(b[i], b[j]) = (b[j], b[i])
			i = i + 1
			j = j - 1
	if i < r:
		quickSort(a, i, r, b)
	if l < j:
		quickSort(a, l, j, b)

def main():
	n = int(input())
	a = [0] * n
	b = [0] * n
	for i in range(0, n):
		(a[i], b[i]) = map(int, input().split())
	quickSort(a, 0, n - 1, b)
	for i in range(0, n - 1):
		if b[i] > b[i + 1]:
			print('Happy Alex')
			return
	print('Poor Alex')
main()


import sys
n = int(input())
a = []
b = []
cmin = [0 for i in range(n)]
cmax = [0 for i in range(n)]
for i in range(n):
	(x, y) = [int(i) for i in input().split(' ')]
	a.append(x)
	b.append(y)
for i in range(n):
	cmin[a[i] - 1] = b[i]
	cmax[a[i] - 1] = b[i]
k = 0
if n == 1:
	print('Poor Alex')
else:
	for i in range(n):
		if b[i] < cmin[a[i] - 1]:
			cmin[a[i] - 1] = b[i]
		if b[i] > cmax[a[i] - 1]:
			cmax[a[i] - 1] = b[i]
	for i in range(n - 1):
		if cmax[i] > cmin[i + 1]:
			k = 1
	if k == 1:
		print('Happy Alex')
	else:
		print('Poor Alex')


import os
import sys
from math import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return map(int, input().split())

def array():
	return [int(i) for i in input().split()]

def fun(A):
	return A[1]
d = []
for _ in range(int(input())):
	(s, e) = value()
	d.append((s, e))
f = 1
d = sorted(d, key=fun)
for i in range(len(d) - 1):
	if d[i] > d[i + 1]:
		f = 0
		break
if f == 0:
	print('Happy Alex')
else:
	print('Poor Alex')


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	f = 0
	if a < b or b < a:
		f = 0
		break
	else:
		f = 1
if f == 0:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
s = []
t = []
for i in range(n):
	(x, y) = [int(x) for x in input().split()]
	s.append(x)
	t.append(y)
print('Happy Alex' if s != t else 'Poor Alex')


n = int(input())
(list1, list2) = ([], [])
for i in range(n):
	(a, b) = map(int, input().split())
	list1.append((a, b))
	list2.append((a, b))
list1.sort()
list2.sort(key=lambda elem: elem[1])
if list1 != list2:
	print('Happy Alex')
else:
	print('Poor Alex')


def main():
	n = int(input())
	laptops = []
	for _ in range(n):
		laptops.append([int(x) for x in input().split(' ')])
	laptops.sort(key=lambda a: a[0])
	maxquality = laptops[0][1]
	for i in laptops:
		if maxquality > i[1]:
			print('Happy Alex')
			return
		maxquality = i[1]
	print('Poor Alex')
main()


n = int(input())
A = [0] * n
for i in range(n):
	A[i] = [int(x) for x in input().split()]
A.sort()
a = 0
for i in range(1, n):
	if A[i][1] < A[i - 1][1]:
		a = 1
if a == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
lst = []
flag = False
while n > 0:
	n -= 1
	(a, b) = map(int, input().split())
	lst.append((a, b))
lst.sort(key=lambda x: x[0])
for i in range(1, len(lst)):
	if lst[i - 1][1] > lst[i][1]:
		flag = True
if flag:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input(''))
holder = []
counter = 0
cheap = False
count = 0
while counter < n:
	hold = []
	price = input('')
	hold = price.split(' ')
	holder.append(hold)
	counter += 1
while count < len(holder):
	if holder[count][0] < holder[count][1]:
		cheap = True
	count += 1
if cheap:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
import math as m

def main():
	pass

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def lts(l):
	s = ''.join(map(str, l))
	return s

def stl(s):
	l = list(s)
	return l
mod = int(1000000000.0) + 7

def sinp():
	return sys.stdin.readline().strip()

def iinp():
	return int(input())

def ninp():
	return map(int, sys.stdin.readline().strip().split())

def linp():
	return list(map(int, sys.stdin.readline().strip().split()))

def p(a):
	print(a)

def p2(a, b):
	print(a, b)
n = iinp()
price = 2384972384
bmax = 0
a1 = [0] * n
f = 0
for i in range(n):
	(a, b) = ninp()
	a1[a - 1] = b
for i in range(n - 1):
	if a1[i] > a1[i + 1]:
		print('Happy Alex')
		f = 1
		break
if f == 0:
	print('Poor Alex')


n = int(input())
(a, b) = [int(x) for x in input().split()]
p = 0
for i in range(n - 1):
	(c, d) = [int(x) for x in input().split()]
	if a < c and b > d:
		p = 1
		print('Happy Alex')
		break
	elif a > c and b < d:
		p = 1
		print('Happy Alex')
		break
	elif c != d:
		a = c
		b = d
if p == 0:
	print('Poor Alex')


num_laps = int(input())
my_list = []
for x in range(num_laps):
	temp = input()
	temp = temp.split()
	temp = [int(y) for y in temp]
	my_list.append(temp)
my_list.sort()
check = 0
for x in range(num_laps - 1):
	if my_list[x][0] != my_list[x + 1][0] and my_list[x][1] > my_list[x + 1][1]:
		check = 1
		break
if check == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


def parser():
	while 1:
		data = list(input().split(' '))
		for number in data:
			if len(number) > 0:
				yield number
input_parser = parser()

def get_word():
	global input_parser
	return next(input_parser)

def get_number():
	data = get_word()
	try:
		return int(data)
	except ValueError:
		return float(data)
n = get_number()
flag = False
for i in range(n):
	a = get_number()
	b = get_number()
	if a != b:
		print('Happy Alex')
		flag = True
		break
if not flag:
	print('Poor Alex')


n = int(input())
l = []
for i in range(n):
	(c, q) = map(int, input().split())
	l.append([c, q])
l.sort()
prev = l[0][1]
prevc = l[0][0]
f = 0
for i in range(n):
	if l[i][0] > prevc:
		if l[i][1] < prev:
			f = 1
			break
	prev = l[i][1]
	prevc = l[i][0]
if f == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


a = int(input())
ok = False
for i in range(a):
	(x, y) = map(int, input().split())
	if x != y:
		print('Happy Alex')
		ok = True
		break
if ok == False:
	print('Poor Alex')


fast = lambda : stdin.readline().strip()
zzz = lambda : [int(i) for i in fast().split()]
(z, zz) = (input, lambda : list(map(int, z().split())))
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from re import *
from sys import *
from math import *
from heapq import *
from queue import *
from bisect import *
from string import *
from itertools import *
from collections import *
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from collections import Counter as cc
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def output(answer):
	stdout.write(str(answer))
num = int(z())
lst = []
c = 0
for _ in range(num):
	(x, y) = zz()
	if x < y:
		c = 1
print('Happy Alex' if c else 'Poor Alex')


notebooks = []
n = int(input())
for _ in range(n):
	(a, b) = map(int, input().split())
	notebooks.append([a, b])
notebooks.sort(key=lambda x: x[0])
for i in range(n - 1):
	if notebooks[i][1] > notebooks[i + 1][1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
flag = True
for i in range(n):
	temp = input().strip().split(' ')
	a = int(temp[0])
	b = int(temp[1])
	if a != b:
		print('Happy Alex')
		flag = False
		break
if flag:
	print('Poor Alex')


n = int(input())
ip = []
for i in range(n):
	ip.append(list(map(int, input().split())))
ip.sort()
price = ip[0][0]
mess = ip[0][1]
for i in ip[1:]:
	if i[0] > price and i[1] < mess:
		print('Happy Alex')
		exit(0)
	if i[0] == price:
		mess = i[1]
	else:
		price = i[0]
		mess = i[1]
print('Poor Alex')


from collections import defaultdict as dd
d = {}
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	d[a] = b
(maxq, flag) = (0, 0)
for i in sorted(d.keys()):
	if i == 0:
		maxq = d[i]
	if maxq > d[i]:
		flag = 1
		break
	elif maxq < d[i]:
		maxq = d[i]
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
for i in range(n):
	(i, j) = (int(i) for i in input().split())
	if i != j:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


a = int(input())
b = []
for i in range(a):
	(c, d) = input().split(' ')
	c = int(c)
	d = int(d)
	b.append((c, d))
b = sorted(b, key=lambda x: x[1])
f = 0
for i in range(a - 1):
	if b[i] > b[i + 1]:
		f = 1
		break
if f == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
d = {}
for _ in range(n):
	i = list(map(int, input().split()))
	d[i[0]] = i[1]
s = []
for x in sorted(d):
	s.append(d[x])
print('Poor Alex' if s == sorted(s) else 'Happy Alex')


X = []
for i in range(int(input())):
	X.append(list(map(int, input().split())))
X = sorted(X)
Max = X[0][1]
for i in X:
	if Max > i[1]:
		print('Happy Alex')
		exit()
	Max = max(Max, i[1])
print('Poor Alex')


a = 0
b = 0
for i in range(int(input())):
	l = [i for i in map(int, input().split())]
	if l[0] > l[1]:
		a += 1
	elif l[0] < l[1]:
		b += 1
if a >= 1 and b >= 1:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
n = eval(input())
x = list()
for i in range(n - 1):
	(a, b) = list(map(int, input().split()))
	if a != b:
		print('Happy Alex')
		sys.exit()
print('Poor Alex')


n = input()
laptops = []
for z in range(int(n)):
	laptop = dict()
	(laptop['price'], laptop['quality']) = map(int, input().split(' '))
	laptops.append(laptop)
laptops.sort(key=lambda k: (k['price'], k['quality']))
for (p_laptop, n_laptop) in zip(laptops[:-1], laptops[1:]):
	if p_laptop['quality'] >= n_laptop['quality']:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
alex_right = False
for i in range(n):
	(a, b) = input().split(' ')
	(a, b) = (int(a), int(b))
	if a != b:
		alex_right = True
if alex_right:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
ls = []
for i in range(n):
	ls.append(list(map(int, input().split())))
ls.sort()
first_p = ls[0][0]
maxi_q = ls[0][1]
for l in ls[1:]:
	if l[0] > first_p and l[1] < maxi_q:
		print('Happy Alex')
		break
	maxi_q = l[1]
else:
	print('Poor Alex')


n = int(input())
l = [0] * n
for i in range(n):
	l[i] = list(map(int, input().split()))
l.sort()
for i in range(1, n):
	if l[i][1] < l[i - 1][1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
a = sorted((tuple(map(int, input().split())) for _ in range(n)))
mx = -1
q = 'Poor'
for l in a:
	if l[1] < mx:
		q = 'Happy'
		break
	mx = max(l[1], mx)
print(q, 'Alex')


n = int(input())
a = 'Poor Alex'
while n:
	(l1, l2) = map(int, input().split())
	if l1 < l2:
		a = 'Happy Alex'
	n = n - 1
print(a)


n = int(input())
found = False
for i in range(n):
	(a, b) = list(map(int, input().split()))
	if a < b:
		print('Happy Alex')
		found = True
		break
if found == False:
	print('Poor Alex')


laptops = []
for _ in range(int(input())):
	item = input().split()
	laptops.append((int(item[0]), int(item[1])))
laptops = sorted(laptops, key=lambda item: item[0])
happy = False
count = len(laptops)
for i in range(0, count - 1):
	if laptops[i][1] > laptops[i + 1][1]:
		happy = True
		break
if happy:
	print('Happy Alex')
else:
	print('Poor Alex')


from io import BytesIO, IOBase
from math import sqrt
import sys, os
from os import path
inpl = lambda : list(map(int, input().split()))
inpm = lambda : map(int, input().split())
inpi = lambda : int(input())
inp = lambda : input()
(rev, ra, l) = (reversed, range, len)
P = print
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def B(n):
	return bin(n).replace('0b', '')

def factors(n):
	arr = []
	for i in ra(2, int(sqrt(n)) + 1):
		if n % i == 0:
			arr.append(i)
			if i * i != n:
				arr.append(int(n / i))
	return arr

def dfs(arr, n):
	pairs = [[i + 1] for i in ra(n)]
	vis = [0] * (n + 1)
	for i in ra(l(arr)):
		pairs[arr[i][0] - 1].append(arr[i][1])
	pairs[arr[i][1] - 1].append(arr[i][0])
	comp = []
	for i in ra(n):
		stack = [pairs[i]]
		temp = []
		if vis[stack[-1][0]] == 0:
			while len(stack) > 0:
				if vis[stack[-1][0]] == 0:
					temp.append(stack[-1][0])
					vis[stack[-1][0]] = 1
					s = stack.pop()
					for j in s[1:]:
						if vis[j] == 0:
							stack.append(pairs[j - 1])
				else:
					stack.pop()
			comp.append(temp)
	return comp
from bisect import bisect_left as bl
from bisect import bisect_right as br
import sys, operator, math, operator
from collections import Counter
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
import random, heapq
li = []
n = inpi()
for i in ra(n):
	li.append(inpl())
li.sort()
tr = False
for i in ra(1, n):
	if li[i][1] < li[i - 1][1] and li[i][0] > li[i - 1][0]:
		tr = True
		break
if tr:
	P('Happy Alex')
else:
	P('Poor Alex')


n = int(input())
k = []
for i in range(n):
	k.append([])
	(x, y) = map(int, input().split())
	k[-1].append(x)
	k[-1].append(y)
k.sort()
yes = False
for i in range(n - 1):
	if k[i][0] < k[i + 1][0] and k[i][1] > k[i + 1][1]:
		yes = True
if yes:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l = []
for i in range(n):
	l.append([int(x) for x in input().split()])
l.sort()
best = l[0][1]
for (a, b) in l:
	if b >= best:
		best = b
	else:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
f = []
for i in range(n):
	(a, b) = input().split()
	f.append((int(a), int(b)))
f1 = sorted(f, key=lambda tup: tup[0])
f2 = sorted(f, key=lambda tup: tup[1])
b = False
for i in range(n):
	if f1[i] != f2[i]:
		b = True
		break
if not b:
	print('Poor Alex')
else:
	print('Happy Alex')


s = 0
lst = []
z = int(input())
for x in range(z):
	(c, v) = [int(b) for b in input().split()]
	b = (c, v)
	lst.append(b)
lst.sort()
for n in range(len(lst) - 1):
	if lst[n][1] >= lst[n + 1][1]:
		s += 1
if s == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
vc = []
for i in range(n):
	ii = list(map(int, input().split()))
	vc.append(ii)
vc.sort(key=lambda x: [x[0], x[1]])
maxi = -1
fl = False
for i in range(n):
	if maxi > vc[i][1]:
		fl = True
	maxi = max(maxi, vc[i][1])
if fl is True:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
flag = 1
for i in range(0, n):
	(k, j) = map(int, input().split(' '))
	if k < j:
		print('Happy Alex')
		flag = 0
		break
if flag:
	print('Poor Alex')


z = int(input())
x = []
m = 0
for _ in range(z):
	a = tuple(map(int, input().split()))
	x.append(a)
x.sort()
for i in range(z - 1):
	if x[i][0] < x[i + 1][0] and x[i][1] > x[i + 1][1]:
		print('Happy Alex')
		break
	else:
		m = m + 1
if m == z - 1:
	print('Poor Alex')


n = int(input())
a = 'Poor Alex'
for i in range(n):
	(p, q) = [int(x) for x in input().split()]
	if p < q:
		a = 'Happy Alex'
print(a)


n = int(input())
notebooks = list()
for i in range(n):
	notebooks.append(list(map(int, input().split())))
notebooks = sorted(notebooks, key=lambda notebooks: notebooks[0])
flag = False
for i in range(n - 1):
	if notebooks[i][1] > notebooks[i + 1][1]:
		print('Happy Alex')
		flag = True
		break
if not flag:
	print('Poor Alex')


n = int(input())
for i in range(n):
	(c, d) = map(int, input().split())
	if c != d:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


from sys import stdin, stdout
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
n = ii1()
arr = []
for _ in range(n):
	arr.append(iia())
arr.sort()
prev = arr[0][1]
for lap in arr[1:]:
	if prev > lap[1]:
		print('Happy Alex')
		break
	else:
		prev = lap[1]
else:
	print('Poor Alex')


from sys import stdin
t = int(stdin.readline())
a = []
for i in range(t):
	(n, m) = map(int, stdin.readline().strip().split())
	a.append((n, m))
f = 0
a.sort()
for i in range(t - 1):
	if a[i][0] < a[i + 1][0] and a[i][1] > a[i + 1][1]:
		print('Happy Alex')
		f = 1
		break
if f == 0:
	print('Poor Alex')


n = int(input())
list2 = []
for x in range(n):
	list1 = [int(i) for i in input().split()]
	list2.append(list1)
list2.sort()
highest = 0
flag = False
for item in list2:
	if item[1] < highest:
		flag = True
		break
	highest = item[1]
if flag:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
c = dict()
for i in range(n):
	(a, b) = [int(i) for i in input().split()]
	c[a] = min(b, c.get(a, 1000000))
prev = 0
for i in sorted(c.keys()):
	if c[i] < prev:
		print('Happy Alex')
		break
	prev = c[i]
else:
	print('Poor Alex')


def Sorted(arr):
	return arr[0]
n = int(input())
Dict = [0] * n
for numb in range(n):
	Dict[numb] = [int(a) for a in input().split()]
Dict = sorted(Dict, key=Sorted)
inOrder = True
for x in range(1, n):
	if Dict[x][1] < Dict[x - 1][1]:
		inOrder = False
if inOrder:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
notebooks = {}
for i in range(n):
	(a, b) = map(int, input().strip().split(' '))
	notebooks[a] = b
key_sorted = list(notebooks.keys())
key_sorted.sort()
for j in range(0, n - 1):
	if notebooks[key_sorted[j]] > notebooks[key_sorted[j + 1]]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


pops = int(input())
sa = [[0, 0] for t in range(pops)]
for t in range(pops):
	(a, b) = list(map(int, input().split(' ')))
	sa[t][0] = a
	sa[t][1] = b
sa.sort()
sa2 = [sa[x][1] for x in range(len(sa))]
sa3 = sa2[:]
sa2.sort()
if sa3 != sa2:
	print('Happy Alex')
else:
	print('Poor Alex')


c = int(input())
laptops = []
for i in range(c):
	(price, qa) = input().split(' ')
	laptops.append((int(price), int(qa)))
laptops.sort(key=lambda t: t[0])
prev_qa = -1
for (price, qa) in laptops:
	if prev_qa > qa:
		print('Happy Alex')
		break
	prev_qa = qa
else:
	print('Poor Alex')


n = int(input())
for i in range(n):
	c = input()
	a = int(c[:c.find(' ')])
	b = int(c[c.find(' '):])
	if b > a:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


import sys
import math
n = int(sys.stdin.readline())
b = {}
for i in range(n):
	(x, y) = [int(x) for x in sys.stdin.readline().split()]
	b[x] = y
t = sorted(b.keys(), reverse=True)
k = t[0]
for c in t[1:]:
	if b[c] > b[k]:
		print('Happy Alex')
		exit()
	else:
		k = c
print('Poor Alex')


def solve():
	n = int(input())
	arr = []
	f = 0
	s = 0
	while n:
		(a, b) = map(int, input().split())
		if a < b:
			f = 1
		if a > b:
			s = 1
		n -= 1
	if f and s:
		print('Happy Alex')
	else:
		print('Poor Alex')
solve()


def Func(Laptops):
	for i in range(len(Laptops) - 1):
		if Laptops[i][0] < Laptops[i + 1][0] and Laptops[i][1] > Laptops[i + 1][1]:
			print('Happy Alex')
			return
	print('Poor Alex')

def byPrice(a):
	return a[0]
n = int(input())
Laptops = []
for i in range(n):
	(price, quality) = tuple(map(int, input().split()))
	Laptops.append((price, quality))
Laptops.sort(key=byPrice)
Func(Laptops)


S = sorted
M = lambda : map(int, input().split())
lap = []
for _ in range(int(input())):
	(a, b) = M()
	lap += [a != b]
print(['Poor Alex', 'Happy Alex'][any(lap)])


import sys
n = int(input())
listOfLap = list()
for i in range(n):
	listOfLap.append(input().split())
listOfLap = sorted(listOfLap, key=lambda l: l[0])
i = 0
for i in range(0, n - 1):
	if listOfLap[i][1] > listOfLap[i + 1][1]:
		print('Happy Alex')
		sys.exit(0)
print('Poor Alex')


N = int(input())
laptops = []
for i in range(N):
	laptop = input()
	list = laptop.split(' ')
	laptops.append([int(list[0]), int(list[1])])
laptops.sort()
if N != 1:
	for i in range(N - 1, 0, -1):
		if laptops[i][1] < laptops[i - 1][1]:
			print('Happy Alex')
			break
		elif i == 1:
			print('Poor Alex')
			break
else:
	print('Poor Alex')


n = int(input())
f = 0
res = []
for _ in range(n):
	(p, q) = map(int, input().split())
	res.append((p, q))
res.sort(key=lambda x: (x[0], -x[1]))
ans = res[0][0]
maxib = res[0][1]
for i in range(1, n):
	if res[i][0] > res[i - 1][0] and res[i][1] < maxib:
		f = 1
		break
	maxib = max(maxib, res[i][1])
print('Happy Alex' if f else 'Poor Alex')


x = int(input())
nega = 'Poor Alex'
for n in range(x):
	(p, q) = map(int, input().split())
	if p < q:
		nega = 'Happy Alex'
print(nega)


n = [int(i) for i in input().split()][0]
a = [0] * n
for i in range(n):
	(cura, curb) = [int(i) for i in input().split()]
	a[i] = (cura, curb)
a = sorted(a)
flag = True
for i in range(1, n):
	if a[i - 1][1] > a[i][1] and a[i][0] > a[i - 1][0]:
		flag = False
if flag:
	print('Poor Alex')
else:
	print('Happy Alex')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	a = sorted([LI() for _ in range(n)])
	mi = -1
	mj = -1
	for (i, j) in a:
		if mi < i and mj > j:
			return 'Happy Alex'
		if mj < j:
			mj = j
			mi = i
	return 'Poor Alex'
print(main())


def main():
	flag = True
	price = []
	quality = []
	n = int(input())
	for i in range(n):
		(p, q) = map(int, input().split())
		price.append(p)
		quality.append(q)
	pairs = list(zip(price, quality))
	pairs.sort(key=lambda x: x[0])
	i = 0
	if n == 1:
		flag = False
		print('Poor Alex')
	while flag == True:
		if pairs[i][0] < pairs[i + 1][0] and pairs[i][1] > pairs[i + 1][1]:
			print('Happy Alex')
			flag = False
			break
		i += 1
		if i == n - 1:
			print('Poor Alex')
			flag = False
main()


n = int(input())
l = sorted([list(map(int, input().split())) for _ in range(n)])
b = 0
f = False
for x in l:
	if x[1] < b:
		f = True
		break
	b = x[1]
print('HPaopopry'[1 - f::2] + ' Alex')


num = int(input())
my_dict = {}
quality_sort = []
for x in range(num):
	(price, quality) = map(int, input().split())
	quality_sort.append(quality)
	my_dict[quality] = price
quality_sort.sort(reverse=True)
for x in range(num - 1):
	if my_dict[quality_sort[x]] < my_dict[quality_sort[x + 1]]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


from sys import exit
num = int(input())
for i in range(num):
	(numA, numB) = map(int, input().split())
	if numA < numB:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
arr = []
arr2 = []
for i in range(n):
	tmp = list(map(int, input().split()))
	arr2.append(tmp[1])
	arr.append(tmp)
arr2.sort()
arr.sort(key=lambda x: x[0])
for i in range(len(arr)):
	if arr[i][1] != arr2[i]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


l1 = []
a = int(input())
for _ in range(a):
	l1.append(tuple(map(int, input().split())))
sorted_by_second = sorted(l1, key=lambda tup: tup[1])
sorted_by_first = sorted(l1, key=lambda tup: tup[0])
if sorted_by_first == sorted_by_second:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
arr = []
for i in range(0, n):
	vals = [int(x) for x in input().strip().split()]
	arr.append(vals)
arr = sorted(arr, key=lambda x: x[0])
flag = False
for i in range(0, n - 1):
	if arr[i][1] > arr[i + 1][1]:
		flag = True
		break
if flag:
	print('Happy Alex')
else:
	print('Poor Alex')


answer = 0
for item in [0] * int(input()):
	(x, y) = map(int, input().split())
	if x != y:
		answer = answer + 1
	else:
		ans = 0
if answer > 0:
	print('Happy Alex')
else:
	print('Poor Alex')


from sys import stdin, stdout
nmbr = lambda : int(stdin.readline())
lst = lambda : list(map(int, stdin.readline().split()))
for _ in range(1):
	n = nmbr()
	f = 0
	l = [lst() for _ in range(n)]
	l.sort(key=lambda x: -x[1])
	for i in range(1, n):
		(p1, hq) = l[i - 1]
		(p2, lq) = l[i]
		if hq > lq and p1 < p2:
			f = 1
			break
	print('Happy Alex' if f else 'Poor Alex')


def price(g):
	return g[0]

def quality(g):
	return g[1]
n = int(input())
lis = []
for i in range(n):
	(a, b) = list(map(int, input().split()))
	lis.append((a, b))
lis.sort(key=price)
if sorted(lis, key=quality) == lis:
	print('Poor Alex')
else:
	print('Happy Alex')


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt
import unittest

def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
n = read_int()
A = []
for _ in range(n):
	A += [read_int_array()]
A.sort()
max_ai = 0
has_cq = False
for (c, q) in A:
	if q < max_ai:
		has_cq = True
		break
	max_ai = q
print('Happy Alex' if has_cq else 'Poor Alex')


n = int(input())
q = []
flag = 1
for _ in range(n):
	q.append(tuple([int(x) for x in input().split()]))
q.sort()
base = q[0][1]
for i in q:
	if i[1] < base:
		flag = 0
		break
	elif i[1] > base:
		base = i[1]
print(['Happy', 'Poor'][flag], 'Alex')


n = int(input())
p = 'Poor Alex'
for i in range(n):
	(k, l) = map(int, input().split())
	if k < l:
		p = 'Happy Alex'
print(p)


c = 0
for i in range(int(input())):
	(x, y) = list(map(int, input().split()))
	if x != y:
		c = 1
if c == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


from collections import Counter
n = int(input())
a = []
l = {}
for i in range(n):
	(n, m) = map(int, input().split())
	a += [n]
	l[n] = m
c = {}
a.sort()
f = {}
for i in a:
	f[i] = l[i]
g = list(f.values())
t = g[:]
if t != sorted(t):
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
char = []
for i in range(n):
	char.append([int(x) for x in input().split()])
char.sort(key=lambda x: x[0])
Work = []
sortWork = []
for i in range(n):
	Work.append(char[i][1])
	sortWork.append(char[i][1])
sortWork.sort()
print('Poor Alex') if Work == sortWork else print('Happy Alex')


import sys
[n] = [int(x) for x in input().split('\n')]
price = []
quality = []
for i in range(n):
	[p, q] = [int(x) for x in input().split(' ')]
	if p != q:
		print('Happy Alex')
		sys.exit()
else:
	print('Poor Alex')


n = int(input())
l = []
res = False
for x in range(n):
	l.append(list(map(int, input().split())))
l.sort()
for x in range(1, n):
	if l[x][0] > l[x - 1][0] and l[x][1] < l[x - 1][1]:
		res = True
cout = 'Happy Alex' if res else 'Poor Alex'
print(cout)


z = 0
for t in range(int(input())):
	(a, b) = [int(i) for i in input().split()]
	if a != b:
		z = -1
print('Happy Alex' if z == -1 else 'Poor Alex')


stat = ('Happy Alex', 'Poor Alex')
n = int(input())
laptops = {}
for a in range(n):
	(price, quality) = map(int, input().split())
	if quality != price:
		try:
			if laptops[quality] > price:
				laptops[quality] = price
		except:
			laptops[quality] = price
sLaptops = sorted(laptops.items())
stats = stat[1]
for b in range(len(sLaptops)):
	if stats == stat[0]:
		break
	for c in range(b, len(sLaptops) - b):
		if sLaptops[c][1] - sLaptops[b][1] < 0:
			stats = stat[0]
			break
print(stats)


n = int(input())
a = []
b = []
k = 0
for i in range(n):
	f = [int(i) for i in input().split(' ')]
	a.append(f[0])
	b.append(f[1])
a = a[1:]
b = b[1:]
for i in range(len(a)):
	if a[i] == b[i]:
		k = k + 1
if k == len(a):
	print('Poor Alex')
else:
	print('Happy Alex')


from sys import stdin, stdout
input = stdin.readline
n = int(input())
q = [0] * 10 ** 5
for i in range(n):
	(a, b) = map(int, input().split())
	q[a - 1] = b
ma = 0
for i in range(n):
	if ma > q[i] and q[i] > 0:
		stdout.write('Happy Alex')
		exit(0)
	elif ma < q[i] and q[i] > 0:
		ma = q[i]
stdout.write('Poor Alex')


def main():
	n = int(input())
	data = [-1] * n
	for i in range(n):
		(a, b) = [int(x) for x in input().split()]
		data[a - 1] = b
	happy = False
	_max = data[0]
	for i in range(n):
		if data[i] < _max:
			happy = True
			break
		else:
			_max = data[i]
	print('Happy Alex' if happy else 'Poor Alex')
main()


n = int(input())
l = []
flag = False
for i in range(n):
	(a1, b1) = map(int, input().split(' '))
	l.append([a1, b1])
for i in range(n - 1):
	if l[i][0] < l[i + 1][0]:
		if l[i][1] > l[i + 1][1]:
			flag = True
			break
	if l[i + 1][0] < l[i][0]:
		if l[i + 1][1] > l[i][0]:
			flag = True
			break
if l[0][0] < l[-1][0]:
	if l[0][1] > l[-1][1]:
		flag = True
if l[-1][0] < l[0][0]:
	if l[-1][1] > l[0][1]:
		flag = True
if flag == True:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
op = 'Poor Alex'
for i in range(n):
	[a, b] = [int(item) for item in input().split(' ')]
	if a == b:
		continue
	else:
		op = 'Happy Alex'
		break
print(op)


n = int(input())
laptop = []
for i in range(n):
	laptop.append([int(x) for x in input().split()])
laptop.sort()
q = laptop[0][1]
for i in range(1, n):
	if laptop[i][1] < q:
		print('Happy Alex')
		break
	else:
		q = laptop[i][1]
else:
	print('Poor Alex')


n = int(input())
notebook_list = [[int(i) for i in input().split()] for line in range(n)]
check = False
for i in range(n):
	if not notebook_list[i][0] == notebook_list[i][1]:
		check = True
		print('Happy Alex')
		break
if not check:
	print('Poor Alex')


(n, positive, negative, count) = (int(input()), 0, 0, 0)
for _ in range(n):
	(a, b) = map(int, input().split())
	if positive < 1:
		if a - b > 0:
			positive += 1
			count += 1
	if negative < 1:
		if a - b < 0:
			negative += 1
			count += 1
if count == 2:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = [input().split() for i in range(n)]
arr = sorted(a, reverse=True, key=lambda x: x[0])
x = arr[0][1]
for i in arr:
	if i[1] > x:
		print('Happy Alex')
		exit()
	else:
		x = i[1]
print('Poor Alex')


v = []
for i in range(int(input())):
	(a, b) = map(int, input().split())
	v.append([a, b])
v.sort()
z = 0
for i in range(1, len(v)):
	if v[i][0] > v[i - 1][0] and v[i][1] < v[i - 1][1]:
		z = 1
		break
if z == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


from operator import itemgetter
n = int(input())
price_quality = []
for i in range(n):
	price_quality.append([int(i) for i in input().split()])
price_quality.sort(key=itemgetter(0))
for i in range(n - 1):
	if price_quality[i][1] > price_quality[i + 1][1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


import sys
import math
from statistics import mean
from collections import Counter
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
li = list([])
for i in range(n):
	(a, b) = invr()
	li.append([a, b])
li.sort()
flag = False
for i in range(n - 1):
	if li[i][0] < li[i + 1][0]:
		if li[i][1] > li[i + 1][1]:
			flag = True
			break
if flag:
	print('Happy Alex')
else:
	print('Poor Alex')


ale = False
lap = []
n = int(input(''))
for i in range(0, n):
	b = input('')
	b = b.split()
	if b[0] == b[1]:
		continue
	lap = lap + b
	for i in range(0, len(lap)):
		lap[i] = int(lap[i])
	if len(lap) == 4:
		i = 0
		if lap[i] < lap[i + 1] and lap[i + 2] > lap[i + 3] or (lap[i] > lap[i + 1] and lap[i + 2] < lap[i + 3]):
			print('Happy Alex')
			ale = True
			break
		elif lap[i] == lap[i + 1] or lap[i + 2] == lap[i + 3]:
			lap.pop(0)
			lap.pop(0)
			ale = False
		else:
			lap.pop(0)
			lap.pop(0)
			ale = False
if ale == False:
	print('Poor Alex')


n = int(input())
A = []
for i in range(n):
	(a, b) = map(int, input().split())
	A.append([a, b])
A.sort(reverse=True)
A.append([0, 0])
icount = 0
for i in range(n):
	if A[i][1] < A[i + 1][1]:
		icount += 1
if icount >= 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
database1 = []
database2 = []
A = []
B = []
for i in range(n):
	(a, b) = map(int, input().split())
	if a != b:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
a = [[int(i) for i in input().split()] for i in range(n)]
result = False
a = sorted(a, key=lambda item: item[1])
for i in range(len(a) - 1):
	if a[i][0] > a[i + 1][0]:
		result = True
		break
print('Happy Alex' if result else 'Poor Alex')


import collections
n = int(input())
d = {}
for i in range(n):
	(a, b) = map(int, input().split())
	d[a] = b
d = collections.OrderedDict(sorted(d.items()))
for i in list(d.keys())[:-1]:
	if d[i] > d[i + 1]:
		print('Happy Alex')
		exit()
print('Poor Alex')


import collections
n = int(input())
t = 0
a = {}
b = []
for k in range(n):
	m = [int(q) for q in input().strip().split()]
	a[m[1]] = m[0]
	b.append(m[0])
a = collections.OrderedDict(sorted(a.items()))
b.sort()
for k in range(len(b)):
	if b[k] != a[k + 1]:
		print('Happy Alex')
		t = 1
		break
if t == 0:
	print('Poor Alex')


(arr, c, flag) = ([], 0, 0)
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	arr.append((a, b))
	c += 1
if c == 1:
	print('Poor Alex')
else:
	arr = sorted(arr, key=lambda x: x[1])
	if arr[0][0] > arr[1][0]:
		print('Happy Alex')
	else:
		(price, flag) = (max(arr[0][0], arr[1][0]), 0)
		for i in range(2, c):
			if price > arr[i][0]:
				flag = 1
				break
			price = max(price, arr[i][0])
		if flag == 1:
			print('Happy Alex')
		else:
			print('Poor Alex')


n = int(input())
l = []
import sys
if n == 1:
	print('Poor Alex')
else:
	for i in range(n):
		l.append(list(map(int, input().split())))
	l = sorted(l, key=lambda d: d[1], reverse=True)
	for i in range(n - 1):
		if l[i][0] < l[i + 1][0]:
			print('Happy Alex')
			sys.exit()
	print('Poor Alex')


def solve(n):
	while n:
		(p, q) = list(map(int, input().strip().split()))
		if q < p:
			return 'Happy Alex'
		n -= 1
	return 'Poor Alex'
n = int(input())
result = solve(n)
print(result)


lst = []
ans = False
n = int(input(''))
for i in range(n):
	(a, b) = map(int, input('').split(' '))
	lst.append([a, b])
lst.sort()
for j in lst:
	if j[0] < j[1]:
		ans = True
if ans == True:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
lap = list()
count = 1
for i in range(0, n):
	ab = input().split()
	lap.append((int(ab[0]), int(ab[1])))
if n == 1:
	print('Poor Alex')
	exit(0)
lap.sort()
for i in range(0, n - 1):
	if lap[i][0] < lap[i + 1][0]:
		if lap[i][1] > lap[i + 1][1]:
			count = count + 1
			print('Happy Alex')
			break
		else:
			count = 0
	else:
		count = 0
if count == 0:
	print('Poor Alex')


a = int(input())
d = []
for i in range(a):
	b = [int(x) for x in input().split()]
	d.append(b[1] - b[0])
if max(d) > 0:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
arr = [list(map(int, input().split())) for i in range(n)]
a = sorted(arr)
b = sorted(arr, key=lambda x: (x[1], x[0]))
ans = 'Happy Alex' if a != b else 'Poor Alex'
print(ans)


n = int(input().strip())
l = []
for i in range(n):
	ins = input().strip().split(' ')
	l.append((int(ins[0]), int(ins[1])))
l.sort(key=lambda tup: tup[0])
found = False
for i in range(n - 1):
	if l[i][1] > l[i + 1][1]:
		found = True
		print('Happy Alex')
		break
if not found:
	print('Poor Alex')


import time
lq = 0
t = int(input())
for i in range(t):
	(p, q) = map(int, input().split())
	if p < q:
		lq = 1
if lq == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


a = [tuple(map(int, input().split())) for _ in range(int(input()))]
a.sort(key=lambda x: x[1], reverse=True)
for i in range(len(a) - 1):
	if a[i][0] < a[i + 1][0]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


number_laptops = int(input())
char_laptop = []
for laptop in range(number_laptops):
	(price, quality) = map(int, input().split())
	price_quality = quality / price
	char_laptop.append((price, quality, price_quality))
min_qual_laptop = min(char_laptop, key=lambda laptop: laptop[2])
char_laptop.sort(key=lambda laptop: laptop[2], reverse=True)
is_happy = False
for laptop in char_laptop:
	if min_qual_laptop[0] > laptop[0] and min_qual_laptop[1] < laptop[1]:
		print('Happy Alex')
		is_happy = True
		break
if is_happy == False:
	print('Poor Alex')


x = int(input())
lst = []
z = 0
for i in range(x):
	(x, y) = input().split(' ')
	x = int(x)
	y = int(y)
	if x < y:
		z += 1
if z > 0:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
bj = True
List = []
for x in range(n):
	List.append(list(map(int, input().split())))
List.sort()
for x in range(1, n):
	if List[x][1] < List[x - 1][1]:
		print('Happy Alex')
		bj = False
		break
if bj:
	print('Poor Alex')


import sys
from math import *
input = sys.stdin.readline
RI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw = lambda : input().strip().split()
ls = lambda : list(input().strip())
from collections import defaultdict as df
import heapq
infinite = float('inf')
n = int(input())
l = []
for i in range(n):
	(a, b) = RI()
	l.append((a, b))
l.sort()
f = 0
for i in range(n - 1):
	if l[i + 1][1] < l[i][1]:
		f = 1
		break
if f == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = []
flag = 0
for _ in range(n):
	x = list(map(int, input().rstrip().split()))
	a += [x]
a.sort()
for i in range(n - 1):
	if a[i][1] > a[i + 1][1]:
		flag = 1
		break
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


def solve(l):
	l = sorted(l, key=lambda x: x[0])
	quality = 0
	for i in l:
		if i[1] <= quality:
			return True
		quality = i[1]
	return False
R = lambda : list(map(int, input().split()))
n = int(input())
l = [R() for _ in range(n)]
r = solve(l)
print('Happy Alex' if r else 'Poor Alex')


n = int(input())
p1 = 100000
q1 = 0
p2 = 0
q2 = 100000
for i in range(n):
	(a, b) = map(int, input().split())
	if a < b:
		if a < p1:
			p1 = a
		if b > q1:
			q1 = b
	else:
		if a > p2:
			p2 = a
		if b < q2:
			q2 = b
if p1 < p2 and q1 > q2:
	print('Happy Alex')
else:
	print('Poor Alex')


number = int(input())
l = []
for i in range(number):
	lis = list(map(int, input().split()))
	(a, b) = (lis[0], lis[1])
	l.append(lis)
l = sorted(l)
quality = l[0][1]
alex = False
for i in range(1, len(l)):
	if l[i][1] < quality:
		alex = True
		break
	quality = l[i][1]
if alex:
	print('Happy Alex')
else:
	print('Poor Alex')


g = int(input())
t = 0
while g > 0:
	(a, b) = map(int, input().split())
	if a > b:
		t = 1
	g = g - 1
if t == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
arr = []
for _ in range(n):
	arr.append(list(map(int, input().split())))
arr.sort()
for i in range(1, n):
	if arr[i - 1][0] < arr[i][0] and arr[i - 1][1] > arr[i][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
laptops = []
for i in range(n):
	(p, q) = map(int, input().split())
	laptops.append((p, q))

def sortKey(t):
	return t[0]
laptops.sort(key=sortKey)
output = 'Poor Alex'
for i in range(n - 1):
	if laptops[i][1] > laptops[i + 1][1]:
		output = 'Happy Alex'
print(output)


t = int(input())
d = {}
for i in range(t):
	li = [int(i) for i in input().split()]
	d[li[1]] = li[0]
li = list(d.keys())
li.sort()
for i in range(len(li) - 1):
	if d[li[i]] > d[li[i + 1]]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


def drawArray(a):
	for i in a:
		print(i)
a = []
N = int(input())
for i in range(N):
	a.append(list(map(int, input().split(' '))))
a.sort(key=lambda x: x[0])
price = [i[1] for i in a]
if sorted(price) == price:
	print('Poor Alex')
else:
	print('Happy Alex')


import sys
input = sys.stdin.readline
n = int(input())
a = []
for _ in range(n):
	a.append(tuple(map(int, input().split())))
a.sort()
for i in range(1, n):
	if a[i - 1][1] > a[i][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
n = int(input())
l = []
for i in range(n):
	(x, y) = map(int, input().split())
	l.append([x, y])
l.sort()
l3 = [0] * n
c = 100000
ans = 'Poor Alex'
for i in range(n - 1, -1, -1):
	c = min(c, l[i][1])
	if l[i][1] > c:
		ans = 'Happy Alex'
		break
print(ans)


a = int(input())
mat = []
zugo = 0
for i in range(a):
	s = input().split()
	for j in range(2):
		s[j] = int(s[j])
	if s[0] == s[1]:
		pass
	else:
		for k in mat:
			if k[0] > s[0] and k[1] < s[1]:
				print('Happy Alex')
				zugo = 1
				break
			elif k[0] < s[0] and k[1] > s[1]:
				print('Happy Alex')
				zugo = 1
				break
		mat.append(s)
	if zugo == 1:
		break
if zugo != 1:
	print('Poor Alex')


n = int(input())
dic = {}
for i in range(n):
	(price, quality) = map(int, input().split())
	dic[price] = quality
sorted_pr = sorted(dic.keys())
sorted_quality = sorted(dic.keys(), key=lambda x: dic[x])
ans = 'Poor Alex'
for i in range(n):
	if sorted_pr[i] != sorted_quality[i]:
		print('Happy Alex')
		exit()
print('Poor Alex')


import sys

def data():
	return sys.stdin.readline().strip()

def sp():
	return map(int, data().split())

def l():
	return list(sp())
n = int(data())
temp = []
for _ in range(n):
	temp.append(l())
prices = []
quality = []
for (i, val) in enumerate(temp):
	a = val[0]
	b = val[1]
	prices.append(a)
	quality.append(b)
if prices != quality:
	print('Happy Alex')
else:
	print('Poor Alex')


n = eval(input())
i = 1
f = False
while i <= n:
	l = list(map(int, input().split()))
	if l[0] / l[1] != 1:
		f = True
		break
	i += 1
if f:
	print('Happy Alex')
else:
	print('Poor Alex')


from sys import stdin
input = stdin.readline
n = int(input())
a = []
for i in range(n):
	a.append(list(map(int, input().split())))
a.sort()
q = a[0][1]
for i in range(1, n):
	if q > a[i][1]:
		print('Happy Alex')
		exit()
	q = a[i][1]
print('Poor Alex')


n = int(input())
quality = [0] * n
for i in range(n):
	(p, q) = map(int, input().split())
	quality[p - 1] = q
temp = quality.copy()
temp.sort()
if temp == quality:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
message = 'Poor Alex'
for i in range(n):
	(a_i, b_i) = map(int, input().split())
	if a_i < b_i:
		message = 'Happy Alex'
print(message)


n = int(input())
L = [[int(x) for x in input().split(' ')] for i in range(n)]
L.sort()
for j in range(n - 1):
	if L[j][0] < L[j + 1][0] and L[j][1] > L[j + 1][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


a = int(input())
count = 0
l = []
for i in range(0, a):
	l.append([])
	(a, m) = map(int, input().split(' '))
	l[i].append(a)
	l[i].append(m)
l.sort(key=lambda x: x[0])
for i in range(0, a):
	j = l[i][0] / l[i][1]
	if j < 1:
		count += 1
if count > 0:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
c = [[]] * n
for i in range(n):
	c[i] = [int(j) for j in input().split()]
c.sort()
for i in range(n - 1):
	if c[i][0] < c[i + 1][0] and c[i][1] > c[i + 1][1]:
		print('Happy Alex')
		return
print('Poor Alex')


def solve(n):
	f = False
	while n:
		(a, b) = input().split()
		if int(a) != int(b):
			f = True
		n -= 1
	return f
n = input()
if solve(int(n)):
	print('Happy Alex')
else:
	print('Poor Alex')


from operator import itemgetter
n_val = int(input())
price_quality = list()
for idx in range(n_val):
	price_quality.append(tuple(map(int, input().split())))
price_quality.sort(key=itemgetter(0))
for idx in range(1, n_val):
	if price_quality[idx][1] < price_quality[idx - 1][1]:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


n = int(input())
ans = 'Poor Alex'
for f in range(n):
	(a, b) = map(int, input().split())
	if b - a < 0:
		ans = 'Happy Alex'
print(ans)


def is_second_column_sorted(l):
	for i in range(1, len(l)):
		if l[i - 1][1] > l[i][1]:
			return 0
	return 1
n = int(input())
l = []
for _ in range(n):
	l.append(list(map(int, input().split())))
l.sort(key=lambda x: x[0])
if is_second_column_sorted(l) == 1:
	print('Poor Alex')
else:
	print('Happy Alex')


price = {}
t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	price[a] = b
tab = {k: v for (k, v) in sorted(price.items(), key=lambda item: item[0])}
for key in tab:
	try:
		if tab.get(key) > tab.get(key + 1):
			if key < key + 1:
				print('Happy Alex')
				break
		elif tab.get(key) <= tab.get(key + 1):
			if key > key + 1:
				print('Happy Alex')
				break
	except:
		print('Poor Alex')


n = int(input())
ls = []
for i in range(n):
	ls.append(list(map(int, input().split())))
ls = sorted(ls)
flag = 0
for i in range(1, n):
	if ls[i][1] < ls[i - 1][1] and ls[i][0] > ls[i - 1][0]:
		flag = 1
		break
if flag is 1:
	print('Happy Alex')
else:
	print('Poor Alex')


def getKey(item):
	return item[0]
(list1, count, z, c, list2) = ([], 0, [], [], [])
x = input()
a = int(x)
for i in range(a):
	(x, y) = input().split()
	(c, b) = (int(x), int(y))
	z.append([c, b])
	list1.append(b)
z = sorted(z, key=getKey)
list1 = sorted(list1)
for i in range(a):
	if z[i][1] == list1[i]:
		count = count + 1
if count == len(list1):
	print('Poor Alex')
else:
	print('Happy Alex')


t = int(input())
s = 'Poor Alex'
for x in range(t):
	n = list(map(int, input().split()))
	n1 = n[0]
	n2 = n[1]
	if n1 < n2:
		s = 'Happy Alex'
print(s)


n = int(input())
a = []
b = []
for i in range(n):
	(s1, s2) = input().split()
	a.append([int(s1), int(s2)])
a.sort()
cur = a[0][1]
for i in range(1, n):
	if a[i][1] < cur:
		print('Happy Alex')
		exit()
	cur = a[i][1]
print('Poor Alex')


N = int(input())
alex = True
for i in range(N):
	(a, b) = map(int, input().split())
	if a < b:
		alex = False
if not alex:
	print('Happy Alex')
else:
	print('Poor Alex')


from sys import stdin, stdout
cin = stdin.readline
cout = stdout.write
n = int(cin())
lst = [[0] * 2 for _ in range(n)]
for _ in range(n):
	(a, b) = map(int, cin().split())
	lst[a - 1][0] = a
	lst[a - 1][1] = b
for i in range(n - 1):
	if lst[i][1] > lst[i + 1][1]:
		cout('Happy Alex')
		break
else:
	cout('Poor Alex')


l = []
n = int(input())
for _ in range(n):
	(a, b) = map(int, input().split())
	l.append([a, b])
l.sort()
c = 0
for i in range(n - 1):
	if l[i][1] > l[i + 1][1]:
		print('Happy Alex')
		c = c + 1
		break
if c == 0:
	print('Poor Alex')


n = int(input())
i = 0
data = list()
while i < n:
	num = input()
	arr = []
	counting = 0
	for m in range(0, len(num)):
		if num[m] == ' ':
			arr.append(int(num[counting:m]))
			counting = m + 1
		elif m == len(num) - 1:
			arr.append(int(num[counting:len(num)]))
	data.append(arr)
	i += 1
alex = False
for i in range(0, len(data)):
	if data[i][0] < data[i][1]:
		alex = True
		break
if alex is True:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
qual = []
dic = {}
for i in range(n):
	(p, q) = map(int, input().split())
	qual.append(q)
	dic[q] = p
qual.sort()
st = True
for i in range(len(qual) - 1):
	if dic[qual[i]] > dic[qual[i + 1]]:
		st = False
		break
if not st:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
n = int(input())
list1 = []
for i in range(n):
	temp = [int(x) for x in input().split()]
	list1.append(temp)
list1.sort()
for i in range(n - 1):
	if list1[i][1] > list1[i + 1][1]:
		print('Happy Alex')
		sys.exit(0)
print('Poor Alex')


def main():
	n = int(input())
	laptops = []
	for i in range(n):
		laptops.append(list(map(int, input().split(' '))))
	flag = False
	for (price, quality) in laptops:
		if price < quality:
			flag = True
	if flag:
		print('Happy Alex')
	else:
		print('Poor Alex')
main()


n = int(input())
l = []
for x in range(n):
	m = input().split()
	a = (int(m[0]), int(m[1]))
	l.append(a)
l = sorted(l)
h = 0
for x in range(n - 1):
	if l[x][0] < l[x + 1][0] and l[x][1] > l[x + 1][1]:
		h = 1
if h == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l = []
flag = 0
for i in range(n):
	(a, b) = map(int, input().split())
	l1 = [a, b]
	l.append(l1)

def f(i):
	return i[0]
l.sort(key=f)
for i in range(n - 1):
	if l[i][0] < l[i + 1][0] and l[i + 1][1] < l[i][1]:
		flag = 1
		break
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


import math
import sys, collections
from sys import stdin, stdout

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()

def input():
	return sys.stdin.readline().strip()

def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w')

def is_subsequence(x, y):
	x = list(x)
	for letter in y:
		if x and x[0] == letter:
			x.pop(0)
	return not x

def sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, mt.ceil(mt.sqrt(MAXN))):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def getFactorization(x):
	ret = list()
	while x != 1:
		ret.append(spf[x])
		x = x // spf[x]
	return ret

def getFloor(A, x):
	(left, right) = (0, len(A) - 1)
	(ind, floor) = (-1, -1)
	while left <= right:
		mid = (left + right) // 2
		if x < A[mid]:
			right = mid - 1
		else:
			floor = A[mid]
			ind = mid
			left = mid + 1
	return ind
mod = 10 ** 9 + 7

def main():
	(a, b) = ([], [])
	n = int(input())
	for tt in range(n):
		(aa, bb) = get_ints()
		a.append(aa)
		b.append(bb)
	z = list(zip(a, b))
	z.sort()
	(a, b) = ([], [])
	for (i, j) in z:
		a.append(i)
		b.append(j)
	c = 0
	for i in range(n - 1):
		if b[i] > b[i + 1] and a[i] < a[i + 1]:
			c += 1
			break
	if c:
		print('Happy Alex')
	else:
		print('Poor Alex')
main()


n = int(input())
ls = []
for i in range(n):
	(p, q) = tuple(map(int, input().split()))
	ls.append((q, p))
ls.sort()
for i in range(len(ls) - 1):
	if ls[i][1] > ls[i + 1][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
prices = [0] * n
qualities = [0] * n
for i in range(n):
	(prices[i], qualities[i]) = map(int, input().split())
(lp, lq) = zip(*sorted(zip(prices, qualities)))
print(['Happy ', 'Poor '][list(lq) == sorted(lq)] + 'Alex')


p = int(input())
l = []
f = 0
for i in range(p):
	l.append(list(map(int, input().split())))
l.sort()
for i in range(len(l) - 1):
	if l[i][1] > l[i + 1][1]:
		f = 1
		break
print('HPaopopry  AAlleexx'[f == 0::2])


n = int(input())
s = []
for i in range(n):
	s.append(list(map(int, input().split())))

def first(p):
	return p[0]
s.sort(key=first)
flag = False
for i in range(len(s) - 1):
	if s[i][0] != s[i + 1][0] and s[i][1] > s[i + 1][1]:
		flag = True
if flag:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
a = []
for i in range(n):
	(ai, bi) = map(int, input().split())
	b = [ai, bi]
	a.append(b)
a.sort()
c = 0
for j in range(n - 1):
	if a[j][1] > a[j + 1][1]:
		c = 1
		print('Happy Alex')
		break
if c == 0:
	print('Poor Alex')


n = int(input().strip())
d = {}
for i in range(n):
	l = input().strip().split()
	(a, b) = (int(l[0]), int(l[1]))
	d[a] = b
last = 0
alex_is_right = False
for k in sorted(d):
	if d[k] <= last:
		alex_is_right = True
		break
	last = d[k]
if alex_is_right:
	print('Happy Alex')
else:
	print('Poor Alex')


__author__ = 'nikolay'
n = int(input())
a = []
for i in range(n):
	a.append(tuple(map(int, input().split())))
a.sort()
for i in range(1, n):
	if a[i][1] < a[i - 1][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


laptops = []
for _ in range(int(input())):
	laptops.append(tuple([int(x) for x in input().split(' ')]))
laptops.sort()
q = 0
for l in laptops:
	if l[1] < q:
		print('Happy Alex')
		exit()
	else:
		q = l[1]
print('Poor Alex')


n = int(input())
laptops = []
alex = False
for i in range(0, n + 1):
	laptops.append(0)
for i in range(0, n):
	(a, b) = [int(x) for x in input().split()]
	laptops[a] = b
currentA = 0
j = 0
for i in range(1, n + 1):
	if laptops[i] != 0:
		currentA = i
		j = i + 1
		break
for i in range(j, n + 1):
	if laptops[i] != 0:
		if laptops[i] < laptops[currentA]:
			alex = True
			break
		else:
			currentA = i
if alex:
	print('Happy Alex')
else:
	print('Poor Alex')


def parser():
	while 1:
		data = list(input().split(' '))
		for number in data:
			if len(number) > 0:
				yield number
input_parser = parser()

def get_word():
	global input_parser
	return next(input_parser)

def get_number():
	data = get_word()
	try:
		return int(data)
	except ValueError:
		return float(data)
n = get_number()
laptops = []
for i in range(n):
	laptops.append([get_number(), get_number()])
quality_sorted = sorted(laptops, key=lambda x: x[1])
price_sorted = sorted(laptops, key=lambda x: x[0])
if price_sorted != quality_sorted:
	print('Happy Alex')
else:
	print('Poor Alex')


def trial():
	num = int(input())
	laptops = []
	for i in range(num):
		(a, b) = list(map(int, input().split()))
		if a - b > 0:
			laptops.append(a - b)
		else:
			laptops.append(a - b)
	pos = 0
	neg = 0
	for i in laptops:
		if i >= 0:
			pos += 1
		else:
			neg += 1
	if neg > 0 and pos > 0:
		return print('Happy Alex')
	return print('Poor Alex')
trial()


n = int(input())
laptops = []
for i in range(n):
	laptops.append([int(x) for x in input().split()])
pq_dict = {}
for l in laptops:
	pq_dict[l[0]] = l[1] / l[0]
r = max(pq_dict.values())
for pq in pq_dict.values():
	if pq < r:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


import sys
input = sys.stdin.readline
n = int(input())
a = []
b = []
for _ in range(n):
	(x, y) = map(int, input().split())
	a.append(x)
	b.append(y)
for i in range(n):
	a[i] = (a[i], i)
a.sort()
highqual = -1
mp = -1
for i in range(n):
	if b[a[i][1]] > highqual:
		highqual = b[a[i][1]]
	else:
		print('Happy Alex')
		sys.exit()
print('Poor Alex')


import sys
import math
n = int(sys.stdin.readline())
for i in range(n):
	(x, y) = [int(x) for x in sys.stdin.readline().split()]
	if x != y:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
invoer = []
gevonden = False
for i in range(n):
	invoer.append(list(map(int, input().split(' '))))
lijst = sorted(invoer)
for i in range(1, n):
	if lijst[i][1] < lijst[i - 1][1]:
		gevonden = True
		break
if gevonden == True:
	print('Happy Alex')
else:
	print('Poor Alex')


_ = False
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if b > a:
		_ = True
print('Happy Alex' if _ else 'Poor Alex')


n = int(input())
price = []
qly = []
for _ in range(n):
	(a, b) = map(int, input().split())
	price.append(a)
	qly.append(b)
sorted_qly = [x for (_, x) in sorted(zip(qly, range(n)))]
for i in range(1, n):
	if price[sorted_qly[i - 1]] > price[sorted_qly[i]]:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


n = int(input())
L = [list(map(int, input().split())) for _ in range(n)]

def kt(a):
	return a[0]
L.sort(key=kt)
ok = 1
for i in range(1, n):
	if L[i - 1][0] < L[i][0] and L[i - 1][1] > L[i][1]:
		ok = 0
		print('Happy Alex')
		break
if ok:
	print('Poor Alex')


n = int(input())
array = []
for z in range(n):
	(price, quality) = map(int, input().split())
	array.append((price, quality))
array.sort()
for i in range(n - 1):
	if array[i][1] > array[i + 1][1]:
		print('Happy Alex')
		quit()
print('Poor Alex')


def main():
	n = int(input())
	laptops = []
	for i in range(n):
		laptops.append(tuple(map(int, input().split())))
	laptops.sort()
	for i in range(n - 1):
		if laptops[i][1] > laptops[i + 1][1]:
			print('Happy Alex')
			break
	else:
		print('Poor Alex')
	return
main()


def solution():
	a = int(input())
	l = []
	for i in range(a):
		(x, y) = map(int, input().split(' '))
		l.append([x, y])
	l.sort(key=lambda x: x[0])
	m = [l[0][0], l[0][1]]
	for i in range(len(l)):
		if l[i][1] > m[1]:
			m[1] = l[i][1]
			m[0] = l[i][0]
		elif l[i][1] < m[1] and l[i][0] != m[0]:
			print('Happy Alex')
			return
	print('Poor Alex')
solution()


import sys
n = int(input())
answer = 'Poor Alex'
dic_wares = {}
status = False

def partition(arr, low, high):
	i = low - 1
	pivot = arr[high]
	for j in range(low, high):
		if arr[j] <= pivot:
			i = i + 1
			(arr[i], arr[j]) = (arr[j], arr[i])
	(arr[i + 1], arr[high]) = (arr[high], arr[i + 1])
	return i + 1

def quick_sort(arr, low, high):
	if low < high:
		p_i = partition(arr, low, high)
		quick_sort(arr, low, p_i - 1)
		quick_sort(arr, p_i + 1, high)
while n > 0:
	numbers = list(map(int, input().split()))
	price = numbers[0]
	qualtitat = numbers[1]
	if price in dic_wares:
		old_qualitat = dic_wares[price]
		if qualtitat != old_qualitat:
			answer = 'Happy Alex'
	else:
		dic_wares[price] = qualtitat
	n = n - 1
dic_wares_by_values = sorted(dic_wares.items(), key=lambda x: x[1])
dic_wares_by_price = sorted(dic_wares.items(), key=lambda x: x[0])
if dic_wares_by_values != dic_wares_by_price:
	answer = 'Happy Alex'
print(answer)


n = int(input().strip())
stet = []
for i in range(n):
	stet.append(list(map(int, input().split())))
k = True
for i in range(n):
	if stet[i][0] != stet[i][1]:
		k = False
if k == False:
	print('Happy Alex')
else:
	print('Poor Alex')


dic = {}
n = int(input())
for i in range(n):
	(x, y) = list(map(int, input().split()))
	dic[x] = y
l = sorted(dic.keys())
for i in range(n - 1):
	if dic[l[i]] > dic[l[i + 1]]:
		n = -1
		break
if n == -1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
(a_sorted, b_sorted) = (list(), list())
for _ in range(n):
	(a, b) = map(int, input().split())
	a_sorted.append((a, b))
	b_sorted.append((a, b))
a_sorted.sort(key=lambda x: x[0])
b_sorted.sort(key=lambda x: x[1])
for i in range(n):
	if a_sorted[i][0] < b_sorted[i][0] and a_sorted[i][1] > b_sorted[i][1]:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


n = int(input())
price = []
quality = []
for x in range(n):
	(a, b) = map(int, input().split())
	price.append(a)
	quality.append(b)
happyalex = False
for y in range(n):
	if price[y] != quality[y]:
		happyalex = True
if happyalex == True:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
prox = []
for i in range(n):
	(a, b) = map(int, input().split())
	prox.append(b - a)
if max(prox) > 0:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
lst = []
for i in range(n):
	(price, quality) = map(int, input().split())
	lst.append((price, quality))
lst.sort()
p = lst[0]
for i in range(1, n):
	if p[0] < lst[i][0] and p[1] > lst[i][1]:
		print('Happy Alex')
		break
	else:
		p = lst[i]
else:
	print('Poor Alex')


n = int(input())
l = []
f = []
for i in range(n):
	(k, j) = map(int, input().split())
	if k != j:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


x = lambda x: x[1] - x[0]

def r(x):
	print('Happy Alex' if min(x) <= 0 and max(x) > 0 else 'Poor Alex')
r([x(list(map(int, input().split()))) for i in range(int(input()))])


import re

def INT():
	return int(input())

def lis():
	return [int(x) for x in input().split()]

def S():
	return str(input())
n = INT()
a = []
for i in range(n):
	a.append(lis())
a.sort(key=lambda x: x[0])
flag = 0
for i in range(n - 1):
	if a[i][0] < a[i + 1][0] and a[i][1] > a[i + 1][1]:
		flag = 1
		break
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
N = inp()
C = []
for n in range(N):
	(x, y) = invr()
	C.append((x, y))
C = list(sorted(C, key=lambda kv: (kv[0], kv[1])))
prev = -1
ind = -1
fl = True
for i in range(len(C)):
	if C[i][1] > prev:
		prev = C[i][1]
		ind = C[i][0]
	elif ind < C[i][0]:
		fl = False
		break
if not fl:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
A = []
for i in range(n):
	B = [int(i) for i in input().split(' ')]
	A.append(B)
A.sort()
ok = 0
for i in range(len(A) - 1):
	if A[i][0] < A[i + 1][0] and A[i][1] > A[i + 1][1]:
		ok = 1
if ok:
	print('Happy Alex')
else:
	print('Poor Alex')


t = int(input())
c = 0
d = 0
for _ in range(t):
	(a, b) = map(int, input().split())
	if a < b:
		c = c + 1
	if a > b:
		d = d + 1
if c > 0 and d > 0:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
laptop = []
for i in range(n):
	laptop.append([int(x) for x in input().split()])
laptop_1 = sorted(laptop, key=lambda i: i[0])
laptop_2 = sorted(laptop, key=lambda i: i[1])
if laptop_1 == laptop_2:
	print('Poor Alex')
else:
	print('Happy Alex')


import sys
from math import *

def solve():
	n = int(input())
	a = []
	for _ in range(n):
		(x, y) = list(map(int, input().split()))
		a.append([x, y])
	a = sorted(a, key=lambda x: x[0])
	for i in range(n - 1):
		if a[i][1] > a[i + 1][1]:
			return 'Happy'
	return 'Poor'

def main():
	print(solve() + ' ' + 'Alex')
main()


def main():
	count = int(input())
	items = []
	for i in range(count):
		item = list(map(int, input().split(' ')))
		items.append(item)
	items.sort(key=lambda item: item[1])
	prev = items[len(items) - 1]
	for i in range(len(items) - 2, -1, -1):
		if items[i][0] > prev[0]:
			print('Happy Alex')
			return
		prev = items[i]
	print('Poor Alex')
main()


n = int(input())
list1 = []
for i in range(n):
	k = list(map(int, input().split()))
	k.reverse()
	list1.append(k)
list1.sort()
temp = 0
for i in range(len(list1) - 1):
	if list1[i + 1][1] < list1[i][1]:
		temp = 1
		print('Happy Alex')
		break
if temp == 0:
	print('Poor Alex')


q = int(input())
for i in range(q):
	(w, e) = map(int, input().split())
	if w != e:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


T = int(input())
br = 0
for i in range(T):
	(x, y) = [int(j) for j in input().split()]
	if x < y and br == 0:
		print('Happy Alex')
		br = 1
if br == 0:
	print('Poor Alex')


import sys
input = sys.stdin.readline
l = []
for i in range(int(input())):
	l.append(list(map(int, input().split())))
l.sort()
m = [i[1] for i in l]
print(['Happy', 'Poor'][m == sorted(m)], 'Alex')


class Solution456A:

	def __init__(self):
		self.result = False
		self.sets = []

	def parse_input(self):
		num_of_sets = int(input())
		for _ in range(num_of_sets):
			self.sets.append([int(i) for i in input().split(' ')])

	def solve(self):
		a = sorted(self.sets, key=lambda el: el[0])
		b = sorted(self.sets, key=lambda el: el[1])
		for (el_a, el_b) in zip(a, b):
			if el_a[0] > el_b[0]:
				self.result = True

	def get_result(self):
		return 'Happy Alex' if self.result else 'Poor Alex'
solution = Solution456A()
solution.parse_input()
solution.solve()
print(solution.get_result())


def R():
	return map(int, input().split())

def I():
	return int(input())

def S():
	return str(input())

def L():
	return list(R())
from collections import Counter
import math
import sys
from itertools import permutations
n = I()
for _ in range(n):
	(a, b) = R()
	if a != b:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
price = []
quality = []
temp = []
for i in range(n):
	temp = input().split(' ')
	price.append(int(temp[0]))
	quality.append(temp[1])
laptop = {}
for i in range(n):
	laptop[price[i]] = quality[i]
sortedLaptop = {}
sortedLaptop = sorted(zip(laptop.keys(), laptop.values()))
q = int(0)
result = 0
for (k, v) in sortedLaptop:
	if int(v) >= q:
		q = int(v)
	else:
		result = 1
		break
if result is 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
laptops = []
for i in range(n):
	laptops.append(list(map(int, input().split())))
laptops.sort()
if any((laptops[i][1] > laptops[i + 1][1] for i in range(n - 1))):
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
pc = []
for i in range(n):
	pc.append([int(i) for i in input().split()])
pc.sort()
(i, j) = (0, 1)
while j < len(pc):
	if pc[i][1] > pc[j][1]:
		print('Happy Alex')
		break
	i += 1
	j += 1
else:
	print('Poor Alex')


N = int(input())
l = []
for i in range(N):
	(m, n) = map(int, input().split())
	l.append((m, n))
l.sort(key=lambda x: (x[0], x[1]))
c = l[0][1]
cnt = 0
for j in range(1, N):
	if l[j][1] < c:
		cnt += 1
		break
	else:
		c = l[j][1]
if cnt == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input().strip())
(arr, flag) = ([], 0)
for i in range(n):
	(a, b) = map(int, input().strip().split(' '))
	arr.append([a, b])
arr.sort(key=lambda x: x[0])
for i in range(1, n):
	if arr[i][1] < arr[i - 1][1]:
		flag = 1
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
n1 = 'Poor Alex'
for i in range(n):
	(x1, y1) = map(int, input().split(' '))
	if x1 > y1:
		n1 = 'Happy Alex'
print(n1)


def main():
	n = int(input())
	arr = []
	for i in range(n):
		inp = input().split(' ')
		if int(inp[0]) != int(inp[1]):
			print('Happy Alex')
			return
	print('Poor Alex')
main()


N = int(input())
L = [None] * N
for i in range(N):
	L[i] = list(map(int, input().split(' ')))
if all((L[i][0] == L[i][1] for i in range(N))):
	print('Poor Alex')
else:
	tmp = sorted(L)
	if any((tmp[i][1] > tmp[i + 1][1] for i in range(N - 1))):
		print('Happy Alex')
	else:
		print('Poor Alex')


loops = int(input())
arr = []
for i in range(loops):
	x = input().split()
	arr.append([int(x[0]), int(x[1])])
arr.sort(key=lambda x: x[0])
arr2 = sorted(list(arr), key=lambda x: x[1])
if arr == arr2:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
l = lambda x: x[1] / x[0]
a = [l(list(map(int, input().split()))) for _ in ' ' * n]
for i in a:
	if i > 1:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


import sys
n = int(input())
laptops = {}
prices = []
while n:
	(a, b) = map(int, input().split())
	laptops[a] = b
	n -= 1
prices = sorted(laptops.keys())
for i in range(0, len(prices) - 1):
	if laptops[prices[i]] > laptops[prices[i + 1]]:
		print('Happy Alex')
		sys.exit()
print('Poor Alex')


n = int(input())
if n > 1:
	d = dict()
	for i in range(n):
		s = input().split()
		d[int(s[0])] = int(s[1])
	l = list(d.keys())
	l.sort()
	b = False
	for i in range(1, n):
		if d[l[i]] < d[l[i - 1]]:
			b = True
			break
	if b == True:
		print('Happy Alex')
	else:
		print('Poor Alex')
else:
	input()
	print('Poor Alex')


specs = {}
sol = 'Poor Alex'
t = int(input())
for i in range(t):
	(p, s) = map(int, input().split())
	if p > s:
		sol = 'Happy Alex'
print(sol)


n = int(input())
A = []
for i in range(n):
	(a, b) = map(int, input().split())
	A.append([a, b])
A.sort()
k = 0
for i in range(1, n):
	if A[i][1] < A[i - 1][1]:
		k = 1
		break
if k:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
arr_cost = []
arr_quality = []
for _ in range(n):
	(a, b) = map(int, input().split())
	arr_cost.append([a, b])
	arr_quality.append([b, a])
arr_cost.sort()
arr_quality.sort()
flag = False
J = 0
for i in range(n):
	quality = arr_cost[i][1]
	for j in range(J, n):
		if arr_quality[j][0] == quality:
			J = j
			break
		if arr_quality[j][1] > arr_cost[i][0]:
			flag = True
			break
	if flag:
		break
if flag:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
lc = []
lp = []
for i in range(n):
	(c, p) = input().split()
	lc.append((c, i))
	lp.append((p, i))
lc = sorted(lc, key=lambda x: x[0])
lp = sorted(lp, key=lambda x: x[0])
s = 0
for i in range(n):
	if lc[i][1] == lp[i][1]:
		s += 1
if s == n:
	print('Poor Alex')
else:
	print('Happy Alex')


import math
from decimal import Decimal

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)
n = int(input())
f = False
for i in range(n):
	(x, y) = map(int, input().split())
	if x != y:
		f = True
if f:
	print('Happy Alex')
else:
	print('Poor Alex')


li = list()
n = int(input())
for i in range(n):
	val = input()
	(a, b) = val.split()
	li += [(int(a), int(b))]
li.sort()
mx = -1000000000
yes = 0
for i in li:
	if i[1] < mx:
		yes = 1
		break
	mx = max(mx, i[1])
if yes:
	print('Happy Alex')
else:
	print('Poor Alex')


computers = {}
for i in range(int(input())):
	(price, quality) = map(int, input().split())
	computers[price] = quality
sortedByQuality = sorted(computers.items(), key=lambda x: x[1], reverse=True)
isHappy = False
for idx in range(1, len(sortedByQuality)):
	if sortedByQuality[idx][0] > sortedByQuality[idx - 1][0]:
		isHappy = True
		break
if isHappy:
	print('Happy Alex')
else:
	print('Poor Alex')


a = []
b = []
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	a.append((x, _))
	b.append((y, _))
a.sort()
b.sort()
i = 0
flag = 0
while i < len(a):
	if a[i][1] != b[i][1]:
		flag = 1
	i += 1
if flag == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
l = []
for i in range(n):
	l.append(list(map(int, input().split())))
l.sort()
f = 0
for i in range(n - 1):
	if l[i][0] < l[i + 1][0]:
		if l[i][1] > l[i + 1][1]:
			f = 1
			break
if f:
	print('Happy Alex')
else:
	print('Poor Alex')


t = int(input())
bh = []
for i in range(t):
	bh.append([int(i) for i in input().split()])
av = 0
for i in bh:
	if i[0] < i[1]:
		av = 1
		break
if av == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


def sol1():
	n = int(input())
	(x, y) = ('Happy Alex', 'Poor Alex')
	o = y
	for _ in range(n):
		(a, b) = map(int, input().split())
		if a != b:
			o = x
			break
	print(o)
sol1()


import sys

def main():
	input()
	s = sys.stdin.readlines()
	for i in s:
		(a, b) = list(map(int, i.split()))
		if a == b:
			continue
		else:
			return print('Happy Alex')
	return print('Poor Alex')
main()


n = int(input())
b = []
for i in range(n):
	a = list(map(int, input().split()))
	b.append(a)
c = sorted(b, key=lambda l: l[0])
q = 0
for i in range(len(c) - 1):
	if c[i][1] > c[i + 1][1]:
		q = 1
		break
if q == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
data = [list(map(int, input().split())) for i in range(n)]
(price, quality) = zip(*data)
ps = sorted(range(n), key=price.__getitem__)
qs = sorted(range(n), key=quality.__getitem__)
for i in range(n):
	if ps[i] != qs[i]:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


p = input()
n = int(p)
i = 0
hobe = 0
while i < n:
	i = i + 1
	(a, b) = map(int, input().split())
	if a != b:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
HA = False
for i in range(n):
	(price, quali) = map(int, input().split())
	if price != quali:
		HA = True
		break
print('Happy Alex' if price != quali else 'Poor Alex')


l = []
for i in range(int(input())):
	(a, b) = [int(i) for i in input().split()]
	l.append((a, b))
count = 0
for i in l:
	if i[0] < i[1]:
		count += 1
		break
for i in l:
	if i[0] > i[1]:
		count += 1
		break
if count == 2:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
printing = 'Poor Alex'
for i in range(n):
	(b, c) = map(int, input().split())
	if b < c:
		printing = 'Happy Alex'
print(printing)


a = int(input())
b = []
for i in range(a):
	(k, n) = map(int, input().split())
	b.append([k, n])
b.sort(key=lambda r: r[0])
gg = False
for k in range(1, a):
	if b[k][1] < b[k - 1][1]:
		gg = True
		break
print('Happy Alex' if gg else 'Poor Alex')


def main():
	lap = {}
	(a, b) = ([], [])
	t = int(input())
	for i in range(t):
		x = list(map(int, input().split()))
		a.append(x[0])
		b.append(x[1])
	lap = dict(zip(a, b))
	min = 0
	for i in lap:
		if lap[i] < min:
			return True
		else:
			min = lap[i]
	return False
if main():
	print('Happy Alex')
else:
	print('Poor Alex')


flag = 0
l = []
for t in range(int(input())):
	ab = list(map(int, input().split()))
	l.append(ab)
l.sort()
for i in range(len(l) - 1):
	a1 = l[i][0]
	a2 = l[i + 1][0]
	b1 = l[i][1]
	b2 = l[i + 1][1]
	if a1 < a2 and b1 > b2:
		flag = 1
		break
if flag == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


from operator import itemgetter
n = int(input())
laptops = [tuple(map(int, input().split())) for i in range(n)]
alex = False
laptops = sorted(laptops, reverse=True, key=itemgetter(1))
for i in range(1, n):
	if laptops[i - 1][0] < laptops[i][0]:
		alex = True
		break
if alex:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
Alex = False
for i in range(n):
	str = input().split()
	price = int(str[0])
	quality = int(str[1])
	if price < quality:
		Alex = True
if Alex:
	print('Happy Alex')
else:
	print('Poor Alex')


N = int(input())
q = [[0, 0] for i in range(N)]
x = False
for i in range(N):
	(q[i][0], q[i][1]) = map(int, input().split())
s = sorted(q, key=lambda x: x[0])
for k in range(1, N):
	if s[k - 1][1] - s[k][1] > 0:
		x = True
if x:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
while n > 0:
	(a, b) = map(int, input().split())
	n = n - 1
	if b > a:
		print('Happy Alex')
		break
else:
	print('Poor Alex ')


def pair_seq(seq):
	try:
		it = iter(seq)
		first = next(it)
		second = next(it)
		while True:
			yield (first, second)
			first = second
			second = next(it)
	except StopIteration:
		return
data = sorted(([int(x) for x in input().split()] for _ in range(int(input()))))
for (a, b) in pair_seq(data):
	if a[1] > b[1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


n = int(input())
s = []
for i in range(n):
	temp = input().split()
	ttemp = []
	for j in range(2):
		ttemp.append(int(temp[j]))
	s.append(ttemp)
s.sort()
flag = 1
for i in range(1, n):
	if s[i][1] < s[i - 1][1]:
		flag = 0
		break
if flag:
	print('Poor Alex')
else:
	print('Happy Alex')


from operator import itemgetter
n = int(input())
x = []
for i in range(n):
	(a, b) = list(map(int, input().rstrip().split()))
	x.append((a, b))
x = sorted(x, key=lambda x: (x[0], x[1]))
for i in range(n - 1):
	if x[i][1] > x[i + 1][1] and x[i][0] < x[i + 1][0]:
		print('Happy Alex')
		exit(0)
print('Poor Alex')


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
n = iinput()
a = []
for i in range(n):
	a.append(list(map(int, input().split())))
a.sort()
b = [a[i][1] for i in range(n)]
if b == list(sorted(b)):
	print('Poor Alex')
else:
	print('Happy Alex')


import sys
from collections import defaultdict
f = sys.stdin
n = int(f.readline())
for _ in range(n):
	(a, b) = map(int, f.readline().split())
	if a != b:
		print('Happy Alex')
		break
else:
	print('Poor Alex')


from _operator import itemgetter
n = int(input(''))
a = [[int(x) for x in input().split()] for j in range(n)]
flag = 0
a = sorted(a, key=itemgetter(1))
flag = 0
for i in range(n - 1):
	if a[i][0] > a[i + 1][0]:
		flag = 1
		break
if flag == 0:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
res = []
for i in range(n):
	res.append([int(i) for i in input().split()])
res.sort()
flag = 1
if n == 1:
	print('Poor Alex')
else:
	for i in range(1, n):
		if res[i - 1][1] > res[i][1]:
			flag = 0
			break
	if flag == 1:
		print('Poor Alex')
	else:
		print('Happy Alex')


import sys
n = int(sys.stdin.readline())
laptops = []
for i in range(n):
	to_add = tuple((int(x) for x in sys.stdin.readline().split(' ')))
	laptops.append(to_add)
laptops = sorted(laptops)
for i in range(1, n):
	if laptops[i - 1][1] > laptops[i][1]:
		print('Happy Alex')
		sys.exit()
print('Poor Alex')


def findLaptop(l, n):
	for i in range(n - 1):
		if l[i][1] > l[i + 1][1]:
			return 'Happy Alex'
	return 'Poor Alex'
n = int(input())
l = []
for i in range(n):
	(x, y) = map(int, input().split())
	l.append((x, y))
l = sorted(l)
print(findLaptop(l, n))


from sys import stdin, stdout

def quality(laptop):
	return laptop[1]
laptops = []
for i in range(int(stdin.readline())):
	laptops.append([int(c) for c in stdin.readline().strip().split()])
laptops.sort(key=quality, reverse=True)
alex = False
for i in range(1, len(laptops)):
	if laptops[i - 1] < laptops[i]:
		alex = True
		break
if alex:
	stdout.write('Happy Alex')
else:
	stdout.write('Poor Alex')


n = int(input())
data = []
find = 1
for i in range(n):
	s = [int(a) for a in input().split()]
	data.append(s)
datanew = sorted(data, key=lambda d: d[0])
st = datanew[0][1]
if len(datanew) == 1:
	print('Poor Alex')
else:
	for x in range(1, len(datanew)):
		if datanew[x][1] > st:
			st = datanew[x][1]
		else:
			print('Happy Alex')
			find = 0
			break
	if x == len(datanew) - 1 and find == 1:
		print('Poor Alex')


k = int(input())
c = 0
for i in range(k):
	(a, b) = list(map(int, input().split()))
	if a > b:
		print('Happy Alex')
		c = 1
		break
if c == 0:
	print('Poor Alex')


n = int(input())
while n > 0:
	(ai, bi) = [int(x) for x in input().split()]
	if ai < bi:
		print('Happy Alex')
		break
	n = n - 1
else:
	print('Poor Alex')


n = int(input())
laptops = [[0, 0] for i in range(n)]
for i in range(n):
	laptops[i] = list(map(int, input().split()))
quality = laptops[0][1]
price = laptops[0][0] / laptops[0][1]
maxi = price
for i in range(n):
	(quality, price) = (laptops[i][1], laptops[i][0] / laptops[i][1]) if laptops[i][1] > quality else (quality, price)
	maxi = laptops[i][0] / laptops[i][1] if laptops[i][0] / laptops[i][1] > maxi else maxi
print('Happy Alex' if price < maxi else 'Poor Alex')


def laptops(x, y):
	if x != y:
		return 'Happy Alex'
	return 'Poor Alex'
n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	if a != b:
		print('Happy Alex')
		exit()
print('Poor Alex')


n = int(input())
temp_list = list()
for i in range(n):
	line = str(input()).split()
	line = [int(it) for it in line]
	temp_list.append(line)
temp_list.sort(key=lambda x: x[0])
flag = True
for i in range(1, n):
	if temp_list[i - 1][1] > temp_list[i][1]:
		flag = False
if flag:
	print('Poor Alex')
else:
	print('Happy Alex')


n = int(input())
a = [0] * n
b = [0] * n
ni = 0
while n:
	(i, j) = map(int, input().rstrip().split(' '))
	a[i - 1] = i
	b[i - 1] = j
	n -= 1
	ni += 1
r = 'Poor Alex'
for i in range(len(a) - 1):
	if a[i] > a[i + 1] and b[i] < b[i + 1]:
		r = 'Happy Alex'
		break
	if a[i + 1] > a[i] and b[i + 1] < b[i]:
		r = 'Happy Alex'
		break
print(r)


n = int(input())
m = []
guess = False
for i in range(n):
	p = [int(i) for i in input().split()]
	m.append(p)
m = sorted(m)
for i in range(len(m) - 1):
	if m[i][0] < m[i + 1][0] and m[i][1] > m[i + 1][1]:
		guess = True
		break
if guess == True:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
arr = []
for i in range(0, n):
	(p, q) = map(int, input().split())
	arr.append((p, q))
sortarr = sorted(arr)
found = 0
for i in range(1, n):
	if sortarr[i][1] < sortarr[i - 1][1]:
		found = 1
		break
if found == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


def answer(n, a, b):
	tlist = []
	for i in range(n):
		tlist.append((a[i], b[i]))
	tlist_s = sorted(tlist, key=lambda t: t[0])
	for i in range(n - 1):
		if tlist_s[i + 1][1] < tlist_s[i][1]:
			return 'Happy Alex'
	return 'Poor Alex'

def main():
	n = int(input())
	a = [0] * n
	b = [0] * n
	for j in range(n):
		(a[j], b[j]) = [int(i) for i in input().split()]
	print(answer(n, a, b))
main()


m = int(input())
d = {}
while m:
	(x, y) = map(int, input().split())
	d[x] = y
	m -= 1
d = list(sorted(d.items(), key=lambda k: k[0]))
p = 0
o = d[0][1]
for i in range(1, len(d)):
	if d[i][1] > o:
		o = d[i][1]
	else:
		p = 1
		break
if p == 1:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
p = []
q = []
nq = [0 for i in range(n + 1)]
for i in range(n):
	st = input().split()
	nq[int(st[0])] = max(nq[int(st[0])], int(st[1]))
Alex = False
curmax = 0
for i in range(1, n + 1):
	if curmax > nq[i]:
		Alex = True
		break
	else:
		curmax = nq[i]
if Alex:
	print('Happy Alex')
else:
	print('Poor Alex')


n = int(input())
l = []
for i in range(n):
	k = list(map(int, input().split()))
	l.append(k)
best = [10000, -222000]
l.sort(key=lambda x: x[0])
ex = l[-1]
for i in range(1, n):
	if l[i][0] < ex[0] and l[i][1] > ex[1] or l[i][1] < l[i - 1][1]:
		print('Happy Alex')
		break
else:
	print('Poor Alex')