Advertisement
askarulytarlan

Задача J. Король

Oct 10th, 2016
102
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, c, d;
  10.  
  11. int main(int argc, const char * argv[]) {
  12. cin >> a >> b >> c >> d;
  13. if(a + 1 == c || b + 1 == d){
  14. if(a <= 8 || b <= 8){
  15. cout << "YES";
  16. }
  17. }
  18. else{
  19. cout << "NO";
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement