Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 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){
  10. if (abs(y1-y2)==1){
  11. cout <<"YES";
  12. }
  13. }
  14. else if (abs(y1-y2)==2){
  15. if (abs(x1-x2)==1){
  16. cout <<"YES";
  17. }
  18. }
  19. else cout <<"NO";
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement