Submit | All submissions | Best solutions | Back to list |
EILAPTOP2 - Quality and value |
Beo wants to buy a new computer and discusses with his friends. Beo's friends think that the more expensive computer, the faster it will run but he did not think so. Bao believes there are at least two laptops where the cheaper one will run faster. You get the description of N computers, find out that if Beo is right or not.
Input
The first line contains an integer N which is the number of laptops.
In the next N lines, each line contains two integers ai and bi (1 ≤ ai, bi ≤ 10 ^ 9) where ai the price of the computer, bi is the speed of the machine. No two different computer have same price or same speed.
Output
If Beo's thinking is correct, output "Happy Beo", otherwise output "Poor Beo".
Example
Input: 2 1 2 2 1 Output: Happy Beo
Added by: | Ha Minh Ngoc |
Date: | 2018-05-08 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET |