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



Sample input:
0 0 0 1


Sample output:
-1 1 -1 0

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = list(map(int, input().split()))

vx = x2 - x1
vy = y2 - y1

x3 = x2 - vy
y3 = y2 + vx
x4 = x3 - vx
y4 = y3 - vy

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int, input().split())
m = y1 - y2
n = x1 - x2

print(x2+m, y2-n, x1+m, y1-n)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int, input().strip().split(' '))
dx,dy = (x2-x1),(y2-y1)
print(x2-dy, y2+dx, x1-dy, y1+dx)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
print(x2-y2+y1,y2+x2-x1,-y2+y1+x1,x2-x1+y1)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
print(x2-(y2-y1),y2+(x2-x1),x2-(y2-y1)-(x2-x1),y2+(x2-x1)-(y2-y1))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(x: "List[int]", y: "List[int]"):
    d = (x[1] - x[0], y[1] - y[0])
    x2 = x[1] - d[1] 
    y2 = y[1] + d[0] 
    x3 = x[0] - d[1] 
    y4 = y[0] + d[0] 
    return ' '.join([str(z) for z in [x2, y2, x3, y4]])


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    x = [int()] * (2)  # type: "List[int]" 
    y = [int()] * (2)  # type: "List[int]" 
    for i in range(2):
        x[i] = int(next(tokens))
        y[i] = int(next(tokens))
    result = solve(x, y)
    print(result)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x_1,y_1,x_2,y_2=map(int,input().split())
x=x_2-x_1
y=y_2-y_1
x_3=x_2-y
y_3=y_2+x
x_4=x_3-x
y_4=y_3-y
print(str(x_3)+" "+str(y_3)+" "+str(x_4)+" "+str(y_4))

Submission status: Accepted

Solution code:
i = [int(x) for x in input().split()]

x = i[2] - i[0]
y = i[3] - i[1]

print(i[2]-y,i[3]+x,i[0]-y,i[1]+x)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

x1, y1, x2, y2 = map(int, input().split())

X = x1 - x2
Y = y2 - y1

print(x2 - Y, y2 - X, x1 - Y, y1 - X)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
x_vec = x2 - x1
y_vec = y2 - y1
x4,y4 = x1-y_vec, y1+x_vec
x3,y3 = x4+x_vec, y4+y_vec
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
def joinWithSpace(list):
    return " ".join([str(s) for s in list])


x1, y1, x2, y2 = [int(s) for s in input().split(" ")]

x3 = x2 - (y2-y1)
y3 = y2 + (x2-x1)
x4 = x1 - (y2-y1)
y4 = y1 + (x2-x1)

print(joinWithSpace([x3, y3, x4, y4]))

Submission status: Accepted

Solution code:
[x1,y1,x2,y2] = list(map(int,input().split()))
dx = x2-x1
dy = y2-y1
x3,y3 = x2-dy,y2+dx
x4,y4 = x3-dx,y3-dy
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
x = x1-x2
y = y2-y1
print(x2-y, y2-x , x1-y, y1-x)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
dx=x2-x1
dy=y2-y1
print('{} {} {} {}'.format(x2-dy,y2+dx,x1-dy,y1+dx))

Submission status: Accepted

Solution code:
import numpy as np
x1, y1, x2, y2 = map(int, input().rstrip().split())
a = complex(x1, y1)
b = complex(x2, y2)
length = abs(a-b)
c = (a-b) * complex(np.cos(-np.pi/2), np.sin(-np.pi/2)) + b
x3 = int(np.round(c.real))
y3 = int(np.round(c.imag))
d = (b-a) * complex(np.cos(np.pi/2), np.sin(np.pi/2)) + a
x4 = int(np.round(d.real))
y4 = int(np.round(d.imag))
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
print(x2-(y2-y1),y2+(x2-x1),x1-(y2-y1),y1+(x2-x1),sep=" ")

Submission status: Accepted

Solution code:
l = list(map(int,input().split((' '))))
dx = l[2]-l[0]
dy = l[3]-l[1]
print(l[2]-dy,l[3]+dx,l[0]-dy,l[1]+dx)

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
i,j=a[2]-a[0],a[3]-a[1]
i,j=-j,i
x3,y3=a[2]+i,a[3]+j
i,j=-j,i
x4,y4=x3+i,y3+j
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int, input().split(' '))
X = x2 - x1
Y = y2 - y1
print(x2-Y,y2+X,x1-Y,y1+X)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
a = x2 - x1
b = y2 - y1
print(x2-b,y2+a,x2-b-a,y2+a-b)

Submission status: Accepted

Solution code:
# ABC108B - Ruined Square
x1, y1, x2, y2 = list(map(int, input().rstrip().split()))
d1 = x2 - x1
d2 = y2 - y1
    
x3 = x2 - d2
y3 = y2 + d1

x4 = x1 - d2
y4 = y1 + d1

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
z = list(map(int, input().split()))
z.append(z[2] + z[1] - z[3])  #z[4](x_3)を生成
z.append(z[3] - z[0] + z[2])  #z[5](y_3)を生成
z.append(z[4] + z[3] - z[5])  #z[6](x_4)を生成
z.append(z[5] - z[2] + z[4])  #z[7](y_4)を生成
print(z[4], z[5], z[6], z[7])

Submission status: Accepted

Solution code:


def main():
    x1, y1, x2, y2 = map(int, input().split())
    habax = x1 - x2
    habay = y2 - y1
    x3, y3, y4, x4 = x1 - habax - habay, y2 - habax, y2 - habax - habay, x1 - habay
    print(x3, y3, x4, y4)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())

x3 = x2 - y2 + y1
y3 = y2 + x2 - x1
x4 = x1 - y2 + y1
y4 = y1 + x2 - x1

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
xd = x2 - x1
yd = y2 - y1
print(x2 - yd, y2 + xd, x2 - yd - xd, y2 + xd - yd)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
a = y2 - y1
b = x2 - x1
print("{0} {1} {2} {3}".format(x2 - a, y2 + b, x1 - a, y1 + b))

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())

x = x2-x1
y = y2-y1

x3 = x2 - y
y3 = y2 + x
x4 = x3 - x
y4 = y3 - y

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
def func(p,q):
    x=p[0]-q[0]
    y=p[1]-q[1]
    return [x,y]
def fun(p,q):
    x=p[0]+q[0]
    y=p[1]+q[1]
    return [x,y]

x1,y1,x2,y2=map(int,input().split())
p1=[x1,y1]
p2=[x2,y2]
d=func(p2,p1)
d=[-d[1],d[0]]
p3=fun(p2,d)
d=[-d[1],d[0]]

p4=fun(p3,d)
x3=p3[0]
y3=p3[1]
x4=p4[0]
y4=p4[1]
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

x1, y1, x2, y2 = map(int, input().split())

x = x2 - x1
y = y2 - y1

print(x2-y, y2+x, x2-y-x, y2+x-y)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(x0, y0, x1, y1):
    print(x1 - (y1 - y0), y1 + (x1 - x0), x0 - (y1 - y0), y0 + (x1 - x0))
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    x0 = int(next(tokens))
    y0 = int(next(tokens))
    x1 = int(next(tokens))
    y1 = int(next(tokens))
    solve(x0, y0, x1, y1)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#ABC108B
x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1

x3 = x2 - dy
y3 = y2 + dx
 
x4 = x3 - dx
y4 = y3 - dy

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
	
def main():
	X = input().split(" ")
	X = [int(s) for s in X]
	
	dx = X[2] - X[0]
	dy = X[3] - X[1]
	
	ans = "{} {} {} {}".format(X[2]-dy, X[3]+dx, X[0]-dy, X[1]+dx)
	print(ans)
	
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
xi, yi, xii, yii = map(int, input().split())
dx = xii - xi
dy = yii - yi

x = xii
y = yii
for i in range(2):
    dx, dy = -dy, dx
    x += dx
    y += dy
    print(x, y, end=' ')

Submission status: Accepted

Solution code:
xi, yi, xii, yii = map(int, input().split())
dx = xii - xi
dy = yii - yi
x = xii
y = yii
for i in range(2):
    dx, dy = -dy, dx
    x = x + dx
    y = y + dy
    print(x, y, end=' ')

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())

x = x2 - x1
y = y2 - y1

print(x2-y, x+y2, x1-y, x+y1)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())

ans = [x2+y1-y2,y2+x2-x1,x1+y1-y2,y1+x2-x1]
final_ans = map(str, ans)
print(" ".join(final_ans))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

x1, y1, x2, y2 = map(int, input().split())

x = x2 - x1
y = y2 - y1

print(x2-y, y2+x, x2-y-x, y2+x-y)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
x3, y3 = x2 - (y2 - y1), y2 + (x2 - x1)
x4, y4 = x1 - (y2 - y1), y1 + (x2 - x1)
print("{} {} {} {}".format(x3, y3, x4, y4))

Submission status: Accepted

Solution code:
import math
x1, y1, x2, y2 = map(int, input().split())
l = ((x1 - x2)**2 + (y1 - y2)**2)**0.5
theta = math.atan2(y2 - y1, x2 - x1)
theta_rev = theta + 0.5 * math.pi
l_cos_theta_rev = l * math.cos(theta_rev)
l_sin_theta_rev = l * math.sin(theta_rev)

x3 = round(x2 + l_cos_theta_rev)
y3 = round(y2 + l_sin_theta_rev)
x4 = round(x1 + l_cos_theta_rev)
y4 = round(y1 + l_sin_theta_rev)

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
import sys

x1, y1, x2, y2 = map(int, input().split())
x, y = x2 - x1, y2 - y1

print(x2 - y, y2 + x, x1 - y, y1 + x)

Submission status: Accepted

Solution code:
x = [0] * 4
y = [0] * 4
x[0], y[0], x[1], y[1] = map(int, input().split())

x[3] = x[0] - (y[1] - y[0])
y[3] = y[0] + (x[1] - x[0])
x[2] = x[3] - (y[0] - y[3])
y[2] = y[3] + (x[0] - x[3])

print(x[2], y[2], x[3], y[3])

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
x3=x2-(y2-y1)
y3=y2-(x1-x2)
x4=x3-(y3-y2)
y4=y3-(x2-x3)
print('{} {} {} {}'.format(x3,y3,x4,y4))

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int, input().split())
x3,y3=x2-(y2-y1),y2+(x2-x1)
x4,y4=x3-(x2-x1),y3-(y2-y1)
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
def main():
	x1, y1, x2, y2 = map(int, input().split())
	dx = x2 - x1
	dy = y2 - y1
	x3 = x2 - dy
	y3 = y2 + dx
	x4 = x3 - dx
	y4 = y3 - dy

	ans = str(x3) + " " + str(y3) + " " + str(x4) + " " + str(y4)
	print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np

x1, y1, x2, y2 =map(int, input().split())  #複数数値入力

x3 = y1-y2+x2
y3 = x2-x1+y2
x4 = y1-y2+x1
y4 = x2-x1+y1

L = [x3,y3,x4,y4]
print(' '.join(map(str, L)))

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())

x3=b-d+c
y3=c-a+d

x4=b-d+a
y4=c-a+b

print(str(x3) + " " + str(y3) +" "+ str(x4) +" "+ str(y4))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 =map(int,input().split())
x3 = x2 - (y2 - y1)
y3 = y2 + (x2 - x1)
x4 = x1 - (y2 - y1)
y4 = y1 + (x2 - x1)
print('%d %d %d %d'%(x3,y3,x4,y4))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())

dx = x2 - x1
dy = y2 - y1

x3 = x2 - dy
y3 = y2 + dx
x4 = x3 - dx
y4 = y3 - dy

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())

d = (-y2+y1, x2-x1)

print(x2+d[0], y2+d[1], x1+d[0], y1+d[1])

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
e=c-a
f=d-b
g=c-f
h=d+e
i=g-e
j=h-f
print(g)
print(h)
print(i)
print(j)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
xnum = x2-x1
ynum = y2-y1
x3,y3 = x1-ynum,y1+xnum
x4,y4 = x2-ynum,y2+xnum
print(x4,y4,x3,y3)

Submission status: Accepted

Solution code:
x_1, y_1, x_2, y_2 = map(int, input().split())
x_3 = x_2 - y_2 + y_1
y_3 = y_2 + x_2 - x_1
x_4 = x_3 - x_2 + x_1
y_4 = y_3 - y_2 + y_1
print(x_3, y_3, x_4, y_4)

Submission status: Accepted

Solution code:
x_1, y_1, x_2, y_2 = map(int, input().split())
x_3 = x_2 - y_2 + y_1
y_3 = y_2 + x_2 - x_1
x_4 = x_3 - x_2 + x_1
y_4 = y_3 - y_2 + y_1
print(x_3, y_3, x_4, y_4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
print(x2-y2+y1, y2+x2-x1, x1-y2+y1, y1+x2-x1)

Submission status: Accepted

Solution code:
import heapq
def solve():
  x1,y1,x2,y2 = (int(i) for i in input().split())
  x = x2-x1
  y = y2-y1
  print(x2-y,y2+x,x1-y,y1+x)
 	
solve()

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
a = x2 - x1
b = y2 - y1
x3 = x2 - b
y3 = y2 + a
x4 = x1 - b
y4 = y1 + a
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
vector = (x2-x1, y2-y1)

x3, y3 = x2 - vector[1], y2-(-vector[0])
x4, y4 = x3 - vector[0], y3-vector[1]

print(" ".join(map(str, [x3,y3,x4,y4])))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())

sides = x2 - x1 + y2 - y1

x3 = x2 - (y2 - y1)
x4 = x1 - (y2 - y1)
y3 = y2 + (x2 - x1)
y4 = y1 + (x2 - x1)

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
a = map(int, raw_input().split())
x = a[2] - a[0]
y = a[3] - a[1]
x3 = a[2] - y
y3 = a[3] + x
x4 = x3 - x
y4 = y3 - y
print x3, y3, x4, y4

Submission status: Accepted

Solution code:
a, b, c, d = map(int, input().split())  # 複数数値入力

print(str(c - (d - b)), " ", str(c - a + d), " ",
      str(a - (d - b)), " ", b+(c-a), sep=" ")

Submission status: Accepted

Solution code:
x_1, y_1, x_2, y_2 = map(int, input().split())

dx = x_2 - x_1
dy = y_2 - y_1


x_3 = x_2 - dy
y_3 = y_2 + dx
  
x_4 = x_1 - dy
y_4 = y_1 + dx
print(str(x_3) + ' ' + str(y_3) + ' ' + str(x_4) + ' ' + str(y_4))

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
print(c-d+b,d+c-a,a-d+b,b+c-a)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
x3 = x2 - (y2-y1)
y3 = y2 + (x2-x1)
x4 = x1 - (y2-y1)
y4 = y1 + (x2-x1)

print(x3, y3, x4, y4, sep=' ')

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
d1=[x2-x1,y2-y1]
d2=[-d1[1],d1[0]]
r3=[x2+d2[0],y2+d2[1]]
r4=[r3[0]-d1[0],r3[1]-d1[1]]
print(str(r3[0])+' '+str(r3[1])+ ' '+str(r4[0])+ ' '+str(r4[1]))

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int, input().split())
w = x2-x1
h = y2-y1
print(x2-h,y2+w,x1-h,y1+w)

Submission status: Accepted

Solution code:
import math
import numpy as np
x1, y1, x2, y2 = map(int, input().split())
R = np.array([[0, 1], [-1, 0]])
a = np.array([x1, y1])
b = np.array([x2, y2])
ab = b - a
d = ab.dot(R) + a
da = a - d
c = da.dot(R) + d
print(c[0], c[1], d[0], d[1])

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
X=x2-x1
Y=y2-y1
print(x2-Y,y2+X,x1-Y,y1+X)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = list(map(int,input().split()))
dx, dy = x2-x1, y2-y1

print(x2-dy, y2+dx, x1-dy, y1+dx)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = list(map(int,input().split()))
X = x2-x1
Y = y2-y1
print(x2-Y,y2+X,x1-Y,y1+X)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = list(map(int, input().split()))

diff_x = x2 - x1
diff_y = y2 - y1

x3 = x2 - diff_y
y3 = y2 + diff_x
x4 = x1 - diff_y
y4 = y1 + diff_x

print("{} {} {} {}".format(x3, y3, x4, y4))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
x3 = x2 - (y2 - y1)
y3 = y2 + (x2 - x1)
x4 = x3 - (x2 - x1)
y4 = y3 - (y2 - y1)
print(' '.join(map(str, [x3, y3, x4, y4])))

Submission status: Accepted

Solution code:
#input
x1,y1,x2,y2 = map(int,input().split())
#solve
x4,y4 = x1-(y2-y1), y1+(x2-x1)
x3,y3 = x4+(x2-x1),y4+(y2-y1)
print("{} {} {} {}".format(x3,y3,x4,y4))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
print(x2+(y1-y2), y2+(x2-x1), x1-(y2-y1), y1-(x1-x2))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())

dx = abs(x1 - x2)
dy = abs(y1 - y2)

if x1 >= x2 and y1 >= y2:
    print(x2 + dy, y2 - dx, x1 + dy, y1 - dx)
elif x1 >= x2 and y1 < y2:
    print(x2 - dy, y2 - dx, x1 - dy, y1 - dx)
elif x1 < x2 and y1 >= y2:
    print(x2 + dy, y2 + dx, x1 + dy, y1 + dx)
else:
    print(x2 - dy, y2 + dx, x1 - dy, y1 + dx)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = [int(x) for x in input().split()]
X = y1-y2
Y = x2-x1
print(str(x2+X)+' '+str(y2+Y)+' '+str(x1+X)+' '+str(y1+Y))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = (int(i) for i in input().split())

x_diff = x2 - x1
y_diff = y2 - y1

print("{} {} {} {}".format((x2 - y_diff), (y2 + x_diff), (x1 - y_diff), (y1 + x_diff)))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())

dx = x2-x1
dy = y2-y1

x3 = x2-dy
y3 = y2+dx
x4 = x3-dx
y4 = y3-dy

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
a,s,d,f=map(int,input().split())
x3=d-f+s
y3=f+d-a
x4=a-f+s
y4=s+d-a
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
x1, y1, x2, y2 = map(int,input().split())

x3 = x2 + y1 - y2
y3 = y2 - (x1 - x2)
x4 = x1 + y1 - y2
y4 = y1 - (x1 - x2)

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = [int(x) for x in input().split()]

v = [x2 - x1, y2 - y1]
v_rot = [-v[1],  v[0]]
x3, y3 = [x2 + v_rot[0], y2 + v_rot[1]]
x4, y4 = [x1 + v_rot[0], y1 + v_rot[1]]
ans = [x3, y3, x4, y4]

print(" ".join(map(str, ans)))

Submission status: Accepted

Solution code:
a,b,c,d = list(map(int,input().split()))
print(c+(b-d),d-(a-c),c+(b-d)-(c-a),d-(a-c)-(d-b))

Submission status: Accepted

Solution code:
#coding: utf-8
x1, y1, x2, y2 = map(int, input().split())
print(x2-y2+y1, y2+x2-x1, x1-y2+y1, y1+x2-x1)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split());x3,y3=x2-(y2-y1),y2+(x2-x1);x4,y4=x3-(x2-x1),y3-(y2-y1);print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int,input().split())

x3 = x2 - (y2 - y1)
y3 = y2 + (x2 - x1)
x4 = x3 - (y3 - y2)
y4 = y3 + (x3 - x2)

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
x3 = x2-(y2-y1)
y3 = y2+(x2-x1)
x4 = x3-(x2-x1)
y4 = y3-(y2-y1)
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int, input().split())
xsabun = abs(x2 - x1)
ysabun = abs(y2 -y1)
if x1 < x2 :
    if y1 < y2:
        x3 = x2 - ysabun
        y3 = y2 + xsabun
        x4 = x1 - ysabun
        y4 = y1 + xsabun
    else:
        x3 = x2 + ysabun
        y3 = y2 + xsabun
        x4 = x1 + ysabun
        y4 = y1 + xsabun
else:
    if y1 < y2:
        x3 = x2 - ysabun
        y3 = y2 - xsabun
        x4 = x1 - ysabun
        y4 = y1 - xsabun
    else:
        x3 = x2 + ysabun
        y3 = y2 - xsabun
        x4 = x1 + ysabun
        y4 = y1 - xsabun

print("{0} {1} {2} {3}".format(x3,y3,x4,y4))

Submission status: Accepted

Solution code:
# 2019/03/27
# AtCoder Beginner Contest 108 - B

# Input
xy = list(map(int, input().split()))

# Calc
xa = xy[2]-xy[0]
ya = xy[3]-xy[1]

x3 = xy[2]-ya
y3 = xy[3]+xa
x4 = x3-xa
y4 = y3-ya

# Output
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
directionvector = [x2-x1,y2-y1]
x3 = x2 - directionvector[1]
y3 = y2 + directionvector[0]
x4 = x3 - directionvector[0]
y4 = y3 - directionvector[1]
print(str(x3)+" "+str(y3)+" "+str(x4)+" "+str(y4))

Submission status: Accepted

Solution code:
#108
x1, y1, x2, y2 = map(int, input().split())
a = x2 - x1
b = y2 - y1
print((str)((x2-b))+" "+str((y2+a))+" "+(str)((x1-b))+" "+(str)((y1+a)))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
dx = x2-x1
dy = y2-y1
x3 = x2-dy
y3 = y2 + dx
x4 = x1 - dy
y4 = y1 + dx
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = [int(item) for item in input().split()]

xdiff = x1 - x2
ydiff = y1 - y2

print(x2 + ydiff, y2 - xdiff, x1 + ydiff, y1 - xdiff)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(x: "List[int]", y: "List[int]"):
    base = [x[1]-x[0], y[1]-y[0]]
    x3, y3 = [x[1]-base[1], y[1] + base[0]]
    x4, y4 = [x3-base[0], y3-base[1]]
    # x4 = x[0] + y[0]-y[1]
    # y4 = y[0] - x[0]-x[1]
    print(*[x3, y3, x4, y4])
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    x = [int()] * (2)  # type: "List[int]"
    y = [int()] * (2)  # type: "List[int]"
    for i in range(2):
        x[i] = int(next(tokens))
        y[i] = int(next(tokens))
    solve(x, y)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
print('{} {} {} {}'.format(y1-y2+x2,x2-x1+y2,y1-y2+x1,x2-x1+y1))

Submission status: Accepted

Solution code:
x_1, y_1, x_2, y_2 = map(int, input().split())

x_4 = x_1 - (y_2 - y_1)
y_4 = y_1 + (x_2 - x_1)
x_3 = x_4 - (y_1 - y_4)
y_3 = y_4 + (x_1 - x_4)
 
print(x_3, y_3, x_4, y_4)

Submission status: Accepted

Solution code:
a, b, c, d = map(int, input().split())

x = c - a
y = d - b

print(c-y, d+x, a-y, b+x)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
a=x2-x1
b=y2-y1
x3=x2-b
y3=y2+a
x4=x1-b
y4=y1+a
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
from sys import stdin
x1, y1, x2, y2 = [int(x) for x in stdin.readline().rstrip().split()]
print(x2-(y2-y1), y2+(x2-x1), x1-(y2-y1), y1+(x2-x1))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
p_1 = [x1, y1]
p_2 = [x2, y2]
p_3 = [p_2[0]-(p_2[1]- p_1[1]), p_2[1]+ (p_2[0]-p_1[0])]
p_4 = [p_3[0]-(p_3[1]- p_2[1]), p_3[1]+ (p_3[0]-p_2[0])]
ans = list(p_3 + p_4)
ans = [str(i) for i in ans]
print(" ".join(ans))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
x1,y1,x2,y2 = map(int, input().split())
x3 = x2 + y1 - y2
y3 = y2 + x2 - x1
x4 = x1 + y1 - y2
y4 = y1 + x2 - x1
print(str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4))

Submission status: Accepted

Solution code:
import sys
write = sys.stdout.write

a = list(map(int,input().split()))
x1 = a[0]
y1 = a[1]
x2 = a[2]
y2 = a[3]

x4 = x1 + y1 - y2
y4 = x2 + y1 - x1
x3 = x4 + y4 - y1
y3 = x1 + y4 - x4

write(str(x3) + " " + str(y3) + " " + str(x4) + " " + str(y4) + "\n")

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A
def A():
    n = I()
    print(n*800-200*(n//15))

#B
def B():
    k = I()
    ans = 0
    for i in range(1,k):
        for j in range(i+1,k+1):
            if (i%2)^(j%2):
                ans += 1
    print(ans)

#C
def C():
    x,t = LI()
    print(max(0,x-t))

#D
def D():
    n = I()
    ans = 1
    for i in range(1,n+1):
        ans *= i
        ans %= mod
    print(ans)

#E
def E():
    x,y,s,t = LI()
    print(s+y-t,s+t-x,x+y-t,s+y-x)

#F
def F():
    n = I()
    x = LI()
    a = sorted(x)
    for i in range(n):
        j = bisect.bisect_left(a,x[i])
        if j >= n//2:
            print(a[n//2-1])
        else:
            print(a[n//2])

#G
def G():
    n,m = LI()
    if m <= 2*n:print(m//2)
    else:
        ans = n
        m -= 2*n
        ans += m//4
        print(ans)

#H
def H():
    n,k = LI()
    if k%2:
        l = n//k
        print(l**3)
    else:
        l = n//(k/2)
        m = n//k
        l -= m
        print(int(l**3+m**3))

def J():
    n = I()
    d = defaultdict(int)
    for i in range(n):
        a = I()
        if d[a]:
            d[a] -= 1
        else:
            d[a] += 1
    print(sum(d.values()))

def K():
    n,h = LI()
    v = LIR(n)
    s = 0
    i = 0
    v.sort()
    m = v[-1][0]
    v.sort(key = lambda x:-x[1])
    for a,b in v:
        if b > m:
            s += b
            i += 1
            if s >= h:break
    ans = i+(max(0,h-s)//m)
    if max(0,h-s)%m>0:
        ans += 1
    print(ans)
#Solve
if __name__ == "__main__":
    E()

Submission status: Accepted

Solution code:
xy=input().split()
x1=int(xy[0]);y1=int(xy[1]);x2=int(xy[2]);y2=int(xy[3])
y3=y2+(x2-x1);x3=x2-(y2-y1)
y4=y3-(x2-x3);x4=x3-(y3-y2)
print(str(x3)+" "+str(y3)+" "+str(x4)+" "+str(y4))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
x = x2 - x1
y = y2 - y1
x3 = x2 - y
y3 = y2 + x
x4 = x1 - y
y4 = y1 + x
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
x3 = x2 + y1 - y2
y3 = y2 + x2 - x1
x4 = x1 - y2 + y1
y4 = y1 + x2 - x1

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
dx,dy=x2-x1,y2-y1
ans=""
x3,y3=x2-dy,y2+dx

ans+=str(x3)+" "
ans+=str(y3)+" "
dx,dy=x3-x2,y3-y2
x4,y4=x3-dy,y3+dx
ans+=str(x4)+" "
ans+=str(y4)+" "
print(ans)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
w,h=x2-x1,y2-y1
print(x2-h,y2+w,x1-h,y1+w)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
print("{} {} {} {}".format(x2-y2+y1, y2+x2-x1, x1-y2+y1, y1+x2-x1))

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
print(x2-(y2-y1), y2+(x2-x1), x1-(y2-y1), y1+(x2-x1))

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
print(c+b-d,-a+c+d,a+b-d,-a+c+b)

Submission status: Accepted

Solution code:
t=list(map(int,input().split()))
print(t[2]+t[1]-t[3],-t[0]+t[2]+t[3],t[0]+t[1]-t[3],-t[0]+t[2]+t[1])

Submission status: Accepted

Solution code:
a,b,c,d = map(int,input().split())
print(b+c-d,c-a+d,a+b-d,b+c-a)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
side1 = abs(x2 - x1)
side2 = abs(y2 - y1)
if x1 < x2:
    y3 = y2 + side1
    y4 = y1 + side1
else:
    y3 = y2 - side1
    y4 = y1 - side1
if y1 < y2:
    x3 = x2 - side2
    x4 = x1 - side2
else:
    x3 = x2 + side2
    x4 = x1 + side2
print(str(x3)+' '+str(y3)+' '+str(x4)+' '+str(y4))

Submission status: Accepted

Solution code:
x=list(map(int,input().split()))
ans=[0,0,0,0]
ans[0]=x[2]+x[1]-x[3]
ans[1]=x[3]+x[2]-x[0]
ans[2]=x[0]+ans[0]-x[2]
ans[3]=x[1]+ans[1]-x[3]
print(*ans)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())

x3 = x2 + y1 - y2
y3 = -x1 + x2 + y2
x4 = x1 + y1 - y2
y4 = -x1 + x2 + y1

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())

a = x2 - x1
b = y2 - y1

x3 = x2 - b
y3 = y2 + a
x4 = x1 - b
y4 = y1 + a

print("{} {} {} {}".format(x3, y3, x4, y4))

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
x3=x2-y2+y1
y3=y2-x1+x2
x4=x1-y2+y1
y4=y1-x1+x2
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
x = a[2]-a[0]
y = a[3]-a[1]

print(a[2]-y,a[3]+x,a[0]-y,a[1]+x)

Submission status: Accepted

Solution code:
a, b, c, d = (int(i) for i in input().split())
x = c - a
y = d - b
print("{} {} {} {}".format(c-y, d+x, a-y, b+x))

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())

vec12=[x2-x1,y2-y1]
vec23=[-vec12[1],vec12[0]]
vec34=[-vec23[1],vec23[0]]

x3=x2+vec23[0]
y3=y2+vec23[1]
x4=x3+vec34[0]
y4=y3+vec34[1]

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
# coding: utf-8
x1, y1, x2, y2 = map(int, input().split())
a, b = x2 - x1, y2 - y1
x3, y3 = x2 - b, y2 + a
x4, y4 = x1 - b, y1 + a
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
#ABC108 B
x1,y1,x2,y2 = map(int,input().split(' '))

#ベクトル(x,y)を反時計周りに90度回転したベクトルは(-y,x)
vec12 = [x2-x1,y2-y1]
vec23 = [-vec12[1], vec12[0]]
vec34 = [-vec23[1], vec23[0]]
x3 = x2 + vec23[0]
y3 = y2 + vec23[1]
x4 = x3 + vec34[0]
y4 = y3 + vec34[1]
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
a, b, c, d = map(int,input().split())
x = c-a
y = d-b
print(c-y, d+x, a-y, b+x)

Submission status: Accepted

Solution code:
AX, AY, BX, BY = [int(x) for x in input().split()]

def main():
    x = BX - AX
    y = BY - AY
    cx = BX - y
    cy = BY + x
    dx = cx - x
    dy = cy - y

    print(cx, cy, dx, dy)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
x = x1-x2
y = y1-y2
print(x2+y,y2-x,x1+y,y1-x)

Submission status: Accepted

Solution code:
from sys import stdin
x1,y1,x2,y2=[int(x) for x in stdin.readline().rstrip().split()]
x3=x2-(y2-y1)
y3=y2+(x2-x1)
x4=x1-(y2-y1)
y4=y1+(x2-x1)
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))
rr = lambda N: [ri() for _ in range(N)]
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')
OE = lambda x: print('Odd') if x%2 else print('Even')
INF = 10**18

a,b,c,d=rl()
v2_1 = [a-c,b-d]
v2_3 = [v2_1[1],-v2_1[0]]
x3 = c+v2_3[0]
y3 = d+v2_3[1]
x4 = x3+v2_1[0]
y4 = y3+v2_1[1]

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
#S=input()
#N=int(input())
x1,y1,x2,y2=map(int,input().split())
x3=x2-(y2-y1)
y3=y2+(x2-x1)
x4=x3-(y3-y2)
y4=y3+(x3-x2)
print(x3," ",y3," ",x4," ",y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
z=((x2-x1)+(y2-y1)*1j)#from 1 to 2 vector
z3=z*1j+(x2+y2*1j)#counter clockwise 90 degree
z4=z*1j+(x1+y1*1j)#counter clockwise 90 degree
x3,y3=int(z3.real),int(z3.imag)
x4,y4=int(z4.real),int(z4.imag)
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
vx=x2-x1#+
vy=y2-y1#+
x3=x2-vy
y3=y2+vx
x4=x1-vy
y4=y1+vx
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
def calc_orthogonal_vect(x1: int, y1: int, x2: int, y2: int)->tuple:
    if x1 == x2:
        return x2 - (y2 - y1), y2

    return x2 - (y2 - y1), y2 + (x2 - x1)


def ruined_square(x1: int, y1: int, x2: int, y2: int)->tuple:
    x3, y3 = calc_orthogonal_vect(x1, y1, x2, y2)
    x4, y4 = calc_orthogonal_vect(x2, y2, x3, y3)

    return x3, y3, x4, y4


if __name__ == "__main__":
    x1, y1, x2, y2 = map(int, input().split())
    x3, y3, x4, y4 = ruined_square(x1, y1, x2, y2)
    print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
a, b, c, d = map(int,input().split())
x, y = c-a, d-b
print(c-y, d+x, a-y, b+x)