You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
615 B

#include <bits/stdc++.h>
using namespace std;
int main() {
//cin读入优化
std::ios::sync_with_stdio(false);
//输入+输出重定向
freopen("../1294.txt", "r", stdin);
int x1, y1, x2, y2;
cin >> x1 >> y1 >> x2 >> y2;
if (x1 + 2 == x2 && y1 + 2 == y2) cout << "Yes" << endl;
else if (x1 - 2 == x2 && y1 - 2 == y2) cout << "Yes" << endl;
else if (x1 + 2 == x2 && y1 - 2 == y2) cout << "Yes" << endl;
else if (x1 - 2 == x2 && y1 + 2 == y2) cout << "Yes" << endl;
else cout << "No" << endl;
//关闭文件
fclose(stdin);
return 0;
}