(D) Ноутбуки

public
yeskendir.sultanov Apr 26, 2024 Never 100
Clone
1
n = int(input())
2
c = []
3
for i in range(n):
4
x, y = map(int, input().split())
5
c.append((x, y))
6
c = sorted(c)
7
8
result = 'Poor Alex'
9
10
for i in range(1, n):
11
if c[i - 1][0] < c[i][0] and c[i - 1][1] > c[i][1]:
12
result = 'Happy Alex'
13
break
14
15
print(result)