Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. long long x1,x2,y1,y2;
  8. cin>>x1>>y1>>x2>>y2;
  9. if(abs(x1-x2) == 2 && abs(y1-y2) == 1)
  10. cout << "Yes\n";
  11. else if(abs(y1-y2) == 2 && abs(x1-x2) == 1)
  12. cout << "Yes\n";
  13. else
  14. cout << "No\n";
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement