fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  4.  
  5. signed main(){
  6. FAST
  7.  
  8.  
  9. int n;
  10. cin>>n;
  11. bool flag=0;
  12. while(n--){
  13. int a,b;
  14. cin>>a>>b;
  15. if(a!=b){
  16. flag=1;
  17. break;
  18. }
  19. }
  20. if(flag)cout<<"Happy Alex\n";
  21. else cout<<"Poor Alex\n";
  22.  
  23.  
  24.  
  25.  
  26. return 0;
  27. }
  28.  
  29.  
Success #stdin #stdout 0.01s 5304KB
stdin
2
1 2
2 1
stdout
Happy Alex