Advertisement
Guest User

Untitled

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