Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main()
- {
- int A, B, C, D, E;
- cin >> A >> B >> C >> D >> E;
- if(A*B<=D*E)
- {
- if(min(A, B)<=min(D, E)&&max(A, B)<=max(D, E)){cout << "YES"; return 0;}
- }else if(A*C<=D*E)
- {
- if(min(A, C)<=min(D, E)&&max(A, C)<=max(D, E)){cout << "YES"; return 0;}
- }else if(C*B<=D*E)
- {
- if(min(C, B)<=min(D, E)&&max(C, B)<=max(D, E)){cout << "YES"; return 0;}
- } cout << "NO";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement