Problem:
Score : 200 points

Problem Statement

There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order.
(Assume that the positive x-axis points right, and the positive y-axis points up.)

Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).

Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Constraints

|x_1|,|y_1|,|x_2|,|y_2| \leq 100

(x_1,y_1) ≠ (x_2,y_2)

All values in input are integers.

Input

Input is given from Standard Input in the following format:

x_1 y_1 x_2 y_2

Output

Print x_3,y_3,x_4 and y_4 as integers, in this order.

Sample Input 1

0 0 0 1

Sample Output 1

-1 1 -1 0

(0,0),(0,1),(-1,1),(-1,0) is the four vertices of a square in counter-clockwise order.
Note that (x_3,y_3)=(1,1),(x_4,y_4)=(1,0) is not accepted, as the vertices are in clockwise order.

Sample Input 2

2 3 6 6

Sample Output 2

3 10 -1 7

Sample Input 3

31 -41 -59 26

Sample Output 3

-126 -64 -36 -131

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include<bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double inf = 1e20;
const double pi = acos(-1.0);
const int maxp = 1010;
int sgn(double x) {
    if(fabs(x) < eps) return 0;
    if(x < 0) return -1;
    return 1;
}
inline double sqr(double x) {return x*x;}
struct Point {
    double x,y;
    Point() {}
    Point(double _x,double _y) {
        x = _x;
        y = _y;
    }
    void input() {
        scanf("%lf%lf",&x,&y);
    }
    void output() {
        printf("%.2f %.2f\n",x,y);
    }
    bool operator == (Point b)const {
        return sgn(x-b.x) == 0 && sgn(y-b.y) == 0;
    }
    bool operator < (Point b)const {
        return sgn(x-b.x) == 0 ? sgn(y-b.y)<0 : sgn(x-b.x)<0;
    }
    Point operator - (const Point &b)const {
        return Point(x-b.x,y-b.y);
    }
    //　叉积
    double operator ^ (const Point &b)const {
        return x*b.y - y*b.x;
    }
    //　点积
    double operator * (const Point &b)const {
        return x*b.x + y*b.y;
    }
    // 返回长度
    double len() {
        return hypot(x,y); // 库函数
    }
    // 
    double len2() {
        return x*x + y*y;
    }
    double distance(Point p) {
        return hypot(x-p.x,y-p.y);
    }
    Point operator + (const Point &b)const {
        return Point(x+b.x,y+b.y);
    }
    Point operator * (const double &k)const {
        return Point(x*k,y*k);
    }
    Point operator / (const double &k)const {
        return Point(x/k,y/k);
    }
    // 计算 pa 和 pb 的夹角
    // 测试LightOJ1203
    double rad(Point a,Point b) {
        Point p = *this;
        return fabs(atan2(fabs((a-p)^(b-p)),(a-p)*(b-p)));
    }
    // 化为长度为r的向量
    Point trunc(double r) {
        double l = len();
        if(!sgn(l)) return *this;
        r /= l;
        return Point(x*r,y*r);
    }
    // 逆时针旋转90度(绕原点)
    Point rotleft() {
        return Point(-y,x);
    }
    // 顺时针旋转90度(绕原点)
    Point rotright() {
        return Point(y,-x);
    }
    // 绕着p点逆时针旋转angle
    Point rotate(Point p,double angle) {
        Point v = (*this) - p;
        double c = cos(angle),s = sin(angle);
        return Point(p.x + v.x*c - v.y*s,p.y+v.x*s + v.y*c);
    }
};
int main()
{
    int x1,x2,y1,y2,x3,x4,y3,y4;
    while(~scanf("%d%d%d%d",&x1,&y1,&x2,&y2)){
        Point a(x1,y1),b(x2,y2);
        Point c = a.rotate(b,pi+pi/2);
        Point d = b.rotate(a,pi/2);
        printf("%.0f %.0f %.0f %.0f\n",c.x,c.y,d.x,d.y);
    }  
    return 0; 
}