fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. bool skf(int q, int w, int e, int r){
  6. bool t;
  7. if ((q<=e && w<=r) || (q<=r && w<=e)) t = true;
  8. else t = false;
  9. return t;
  10. }
  11.  
  12. int main(){
  13. int a, b, c, x, y;
  14. cin >> a >> b >> c >> x >> y;
  15. if (skf(a, b, x, y) || skf(b, c, x, y) || skf(a, c, x, y)) cout << "YES";
  16. else cout << "NO";
  17. return 0;
  18.  
  19. }
Success #stdin #stdout 0s 15232KB
stdin
12 3 7 5 6
stdout
NO