fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int a,b,c,d;
  8. cin >> a >> b >> c >> d;
  9. if (b == d || a == c) {
  10. cout << "YES";
  11. } else {
  12. cout << "NO";
  13. }
  14. }
  15.  
Success #stdin #stdout 0s 4364KB
stdin
2 1 2 5
stdout
YES