Advertisement
askarulytarlan

Задача I. Ферзь

Oct 10th, 2016
94
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 <fstream>
  3. #include <cmath>
  4. #include <math.h>
  5.  
  6.  
  7. using namespace std;
  8.  
  9. int a, b, d, e;
  10.  
  11. int main(int argc, const char * argv[]) {
  12. cin >> a >> d >> b >> e;
  13. if(a + d == b + e || a - d == b - e || a == b || d == e){
  14. cout << "YES";
  15. }
  16. else{
  17. cout << "NO";
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement