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