傻了,显然在xy必须在矩形中间才能相遇
#include<iostream>
#include<cstdio>
#include<set>
#include<string>
#include<string.h>
#include<cstring>
#include<vector>
#include<map>
#include<queue>
#include<stack>
#include<cctype>
#include<algorithm>
#include<sstream>
#include<utility>
#include<cmath>
#include<functional>
#define mt(a) memset(a,0,sizeof (a))
#define fl(a,b,c) fill(a,b,c)
#define SWAP(a,b,t) (t=a,a=b,b=t)
#define inf 1000000000+7
using namespace std;
typedef long long ll;
int main()
{
int x, y, a, b;
while (cin >> x >> y >> a >> b)
{
int xx, yy, aa, bb;
xx = a; yy = b;
aa = x - a;
bb = y - b;
if (xx == aa&&yy == bb)printf("YES\n");
else printf("NO\n");
}
return 0;
}