构造一条边平行于 xx 轴,一条边平行于 yy 轴的三角形即可。

#include <bits/stdc++.h>
#define y1 Y1
using namespace std;
int main()
{
	long long x1, x2, y1, y2;
	cin >> x1 >> y1 >> x2 >> y2;
	if (y1 != y2 && x1 != x2) cout << x1 << ' ' << y2 << endl;
	if (y1 == y2 && x1 != x2) cout << x1 << ' ' << labs(y2) - 1 << endl;
	if (y1 != y2 && x1 == x2) cout << labs(x1) - 1 << ' ' << y2 << endl;
	return 0;
}