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:
nums = list(map(int, input().split()))
x1 = nums[0]
y1 = nums[1]
x2 = nums[2]
y2 = nums[3]
if x2 > x1:
    if y2 > y1:
        x3 = x2 - (y2 - y1)
        y3 = y2 + (x2 - x1)
        x4 = x1 - (y2 - y1)
        y4 = y1 + (x2 - x1)
    elif y2 < y1:
        x3 = x2 + (y1 - y2)
        y3 = y2 + (x2 - x1)
        x4 = x1 + (x3 - x2)
        y4 = y1 + (y3 - y2)
    else:
        x3 = x2
        y3 = y2 + (x2 - x1)
        x4 = x1
        y4 = y3
elif x2 < x1:
    if y2 > y1:
        x3 = x2 - (y2 - y1)
        y3 = y2 - (x1 - x2)
        x4 = x1 - (x2 - x3)
        y4 = y1 - (y2 - y3)
    elif y2 < y1:
        x3 = x2 + (y1 - y2)
        y3 = y2 - (x1 - x2)
        x4 = x1 + (x3 - x2)
        y4 = y1 - (y2 - y3)
    else:
        x3 = x2
        y3 = y2 - (x1 - x2)
        x4 = x1
        y4 = y3
else:
    if y2>y1:
        x3 = x2 - (y2 - y1)
        y3 = y2
        x4 = x3
        y4 = y1
    else:
        x3 = x2 + (y1 - y2)
        y3 = y2
        x4 = x3
        y4 = y1
print(x3,y3,x4,y4)

Submission status: Accepted

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

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

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

print (x3,y3,x4,y4)

Submission status: Accepted

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

diffx = x1 - x2
diffy = y1 - y2

len_of_v = int((diffx ** 2 + diffy ** 2) ** 0.5)

if diffx == 0:
    x3 = x2 + diffy
    x4 = x1 + diffy
    y3 = y2
    y4 = y1
elif diffy == 0:
    x3 = x2
    x4 = x1
    y3 = y2 - diffx
    y4 = y1 - diffx
else:
    grad = diffy / diffx
    counter_grad = -1 / grad

    x3 = x2 + diffy
    y3 = y2 + diffy * counter_grad

    x4 = x1 + diffy
    y4 = y1 + diffy * counter_grad

print(round(x3), round(y3), round(x4), round(y4))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p = [int(i) for i in input().split (' ')]
x1 = p[0]
y1 = p[1]
x2 = p[2]
y2 = p[3]


if x2-x1 > 0 and y2-y1 > 0:
    lx, ly = x2 - x1, y2 - y1
    x3, y3 = x2 - ly, y2 + lx
    x4, y4 = x3 - lx, y3 - ly
    
elif x2-x1 > 0 and y2-y1 < 0:
    lx, ly = x2 - x1, y1 - y2
    x3, y3 = x2 + ly, y2 + lx
    x4, y4 = x3 - lx, y3 + ly
    
elif x2-x1 < 0 and y2-y1 > 0:
    lx, ly = x1 - x2, y2 - y1
    x3, y3 = x2 - ly, y2 - lx
    x4, y4 = x3 + lx, y3 - ly
else:
    lx, ly = x1 - x2, y1 - y2
    x3, y3 = x2 + ly, y2 - lx
    x4, y4 = x3 + lx, y3 + ly
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
l = input().split(" ")
p = [int(l[0]),int(l[1])]
q = [int(l[2]),int(l[3])]
r = [0,0]
s = [0,0]
if p[0]==q[0]:
    m = q[1]-p[1]
    r[0] = q[0]-m
    r[1] = q[1]
    s[0] = p[0]-m
    s[1] = p[1]
else:
    v = [q[1]-p[1],q[0]-p[0]]
    r[0]= q[0]-v[0]
    r[1]=q[1]+v[1]
    s[0]=p[0]-v[0]
    s[1]=p[1]+v[1]
print(str(r[0])+" "+str(r[1])+" "+str(s[0])+" "+str(s[1]))

Submission status: Accepted

Solution code:
def inpl(): return list(map(int, input().split()))
x1,y1,x2,y2 = inpl()
dx,dy = x2-x1, 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())
xm,ym=(x1+x2)/2,(y1+y2)/2
xa,ya=(x2-x1),(y2-y1)
xmn,ymn=xm-ya,ym+xa
print(int(xmn+xa/2),int(ymn+ya/2),int(xmn-xa/2),int(ymn-ya/2))

Submission status: Accepted

Solution code:
x1,y1,x2,y2=(int(i) for i in 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:
X, Y, x, y = map(int, input().split())
a= x - y + Y
b= y + x - X
c= X - y + Y
d= Y + x - X
print(a, b, c, d)

Submission status: Accepted

Solution code:
input = input().split()
x1 = int(input[0])
y1 = int(input[1])
x2 = int(input[2])
y2 = int(input[3])
x3 = 0
y3 = 0
x4 = 0
y4 = 0


if x1 < x2 :
    if y1 < y2 :
        x3 = x2 - (y2 - y1)
        y3 = y2 + (x2 - x1)
        x4 = x3 - (x2 - x1)
        y4 = y3 - (y2 - y1)
    else:
        x3 = x2 + (y1 - y2)
        y3 = y2 + (x2 - x1)
        x4 = x3 - (x2 - x1)
        y4 = y3 + (y1 - y2)
else:
    if y1 < y2 :
        x3 = x2 - (y2 - y1)
        y3 = y2 - (x1 - x2)
        x4 = x3 + (x1 - x2)
        y4 = y3 - (y2 - y1)
    else:
        x3 = x2 + (y1 - y2)
        y3 = y2 - (x1 - x2)
        x4 = x3 + (x1 - x2)
        y4 = y3 + (y1 - y2)


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

Submission status: Accepted

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

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

dx = x2 - x1
dy = y2 - y1

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

Submission status: Accepted

Solution code:
import sys
def LI(): return [int(x) for x in sys.stdin.readline().split()]


x1, y1, x2, y2 = LI()
res = map(str, [y1-y2+x2, x2-x1+y2, y1-y2+x1, x2-x1+y1])

print(' '.join(res))

Submission status: Accepted

Solution code:
import math

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

edge = math.sqrt(pow(abs(x1 - x2), 2) + pow(abs(y1 - y2),2))

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

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


print(x3, y3, x4, y4)

Submission status: Accepted

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

def rtcc2(x,y,z):
    z = z*1j
    a,b = (x+z.real),y+z.imag
    z = z*1j
    c,d = (a+z.real),(b+z.imag)
    return(int(a),int(b),int(c),int(d))

vector = x2-x1 + (y2-y1)*1j
a,b,c,d = rtcc2(x2,y2,vector)
    
print(a,b,c,d)

Submission status: Accepted

Solution code:
import numpy as np

input_values = input().split(" ")

p1 = np.array([int(input_values[0]),int(input_values[1])])
p2 = np.array([int(input_values[2]),int(input_values[3])])

v1 = p2-p1
v2 = np.array([-v1[1],v1[0]])

p3 = p2+v2

v3 = np.array([-v2[1],v2[0]])
p4 = v3+p3

print(p3[0],p3[1],p4[0],p4[1])

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:
x1,y1,x2,y2 = map(int, input().split())
dx,dy = x1-x2,y1-y2
print(x2+dy,y2-dx,x1+dy,y1-dx)

Submission status: Accepted

Solution code:
input = input().split()
num = []
x3 = 0
y3 = 0
x4 = 0
y4 = 0
for i in range(len(input)):
    num.append(int(input[i]))

a1 = num[2]-num[0]
a2 = num[3]-num[1]

x3 = num[2] - a2
y3 = num[3] + a1
x4 = x3 - a1
y4 = y3 - a2

print(x3, end="")
print(" ", end="")
print(y3, end="")
print(" ", end="")
print(x4, end="")
print(" ", end="")
print(y4, end="")
print()

Submission status: Accepted

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

dx = x2 - x1
dy = y2 - y1

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

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))

x3 = N[1] - N[3] + N[2]
x4 = N[1] - N[3] + N[0]
y3 = N[2] - N[0] + N[3]
y4 = N[2] - N[0] + N[1]

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


vx = x2-x1
vy = y2-y1

vx2,vy2 = (-vy,vx)
x3 = x2 + vx2
y3 = y2 + vy2
vx3,vy3 = (-vy2,vx2)
x4 = x3 + vx3
y4 = y3 + vy3

print(x3,y3,x4,y4)

Submission status: Accepted

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

diff = (x2 - x1, y2 - y1)
x3 = -diff[1] + x2
y3 = diff[0] + y2
x4 = -diff[0] + x3
y4 = -diff[1] + y3
print(x3, y3, x4, y4)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Sep  1 18:56:53 2018
ABC108B
@author: maezawa
"""

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

v1 = [x2-x1, y2-y1]
v2 = [y1-y2, x2-x1]
v3 = [x1-x2, y1-y2]

[x3,y3] = [x2+v2[0], y2+v2[1]]
[x4,y4] = [x3+v3[0], y3+v3[1]]

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

print(x3)
print(y3)
print(x4)
print(y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
a = x1 + y1 * 1j
p = (x2 - x1) + (y2 - y1) * 1j
q = p * 1j
r = p + q

d = a + q
c = a + r

x3 = int(c.real)
y3 = int(c.imag)
x4 = int(d.real)
y4 = int(d.imag)

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
inputs = raw_input().replace("\n", "").split(" ")
x1, y1, x2, y2 = map(int, inputs)

w = x2 - x1
h = y2 - y1
x3, y3 = x2 - h, y2 + w
x4, y4 = x3 - w , y3 - h

print("%d %d %d %d" % (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)

Submission status: Accepted

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

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

print('{0} {1} {2} {3}'. format(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 = x1 - dy
y4 = y1 + dx
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
a = list(map(int, input().split(" ")))
 
p1 = (a[0], a[1])
p2 = (a[2], a[3])
 
dif = (p2[0]-p1[0], p2[1]-p1[1])
 
p3 = (p2[0]-dif[1], p2[1]+dif[0])
p4 = (p3[0]-dif[0], p3[1]-dif[1])
 
print(p3[0], p3[1], p4[0], p4[1])

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("{} {} {} {}".format(x3, y3, x4, y4))

Submission status: Accepted

Solution code:
#Q2

x1, y1, x2, y2 = list(map(int,input().strip().split(' ')))
v12x = (x2 - x1)
v12y = (y2 - y1)

x4, y4 = x1 - v12y, y1 + v12x
x3, y3 = x2 - v12y, y2 + v12x 

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
import math
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())
x = x2 - x1
y = y2 - y1
z = int((x**2 + y**2) ** (1/2))
x3 = x2 - y
y3 = y2 + x
x4 = x1 - y
y4 = y1 + x
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
a, b, c, d = map(int, input() .split())
X = c - a
Y = d - b
e = str(a + X - Y)
f = str(b + X + Y)
g = str(a - Y)
h = str(b + X)
print(e + ' ' + f + ' ' + g + ' ' + h)

Submission status: Accepted

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

vecx = x2 - x1
vecy = y2 - y1

vecx2 = -vecy
vecy2 = vecx

x3 = x2 + vecx2
y3 = y2 + vecy2

x4 = x1 + vecx2
y4 = y1 + vecy2

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

Submission status: Accepted

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

vec = [x2 - x1, y2-y1]

rotated_1 = [-1*vec[1], vec[0]]
rotated_2 = [-1*rotated_1[1], rotated_1[0]]

a = [x2 + rotated_1[0], y2 + rotated_1[1]]
b = [a[0] + rotated_2[0], a[1] + rotated_2[1]]
print(a[0], a[1], b[0], b[1])

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = [int(i) for i in 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:
x = list(map(int, input().split()))
a = []
a.append(x[2] - x[0])
a.append(x[3] - x[1])

ans = [0, 0, 0, 0]

if a[0] >= 0 and a[1] >= 0:
    ans[0] = x[2] - abs(a[1])
    ans[1] = x[3] + abs(a[0])
elif a[0] >= 0 and a[1] < 0:
    ans[0] = x[2] + abs(a[1])
    ans[1] = x[3] + abs(a[0])
elif a[0] < 0 and a[1] < 0:
    ans[0] = x[2] + abs(a[1])
    ans[1] = x[3] - abs(a[0])
else:
    ans[0] = x[2] - abs(a[1])
    ans[1] = x[3] - abs(a[0])

if a[0] >= 0 and a[1] >= 0:
    ans[2] = ans[0] - abs(a[0])
    ans[3] = ans[1] - abs(a[1])
elif a[0] >= 0 and a[1] < 0:
    ans[2] = ans[0] - abs(a[0])
    ans[3] = ans[1] + abs(a[1])
elif a[0] < 0 and a[1] < 0:
    ans[2] = ans[0] + abs(a[0])
    ans[3] = ans[1] + abs(a[1])
else:
    ans[2] = ans[0] + abs(a[0])
    ans[3] = ans[1] - abs(a[1])
zzz = []
for x in ans:
    zzz.append(str(x))
print(" ".join(zzz))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

cos90 = 0
sin90 = 1

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

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

Submission status: Accepted

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

dx=x2-x1
dy=y2-y1

dx,dy=dy,dx
dx*=-1

x3=x2+dx
y3=y2+dy

dx,dy=dy,dx
dx*=-1

x4=x3+dx
y4=y3+dy

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 = x3-a
y4 = y3-b
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
def func(x1, y1, x2, y2):
    x3 = x2 - (y2 - y1)
    y3 = y2 + (x2-x1)
    return x3, y3

x1, y1, x2, y2 = [int(i) for i in input().split()]
x3, y3 = func(x1, y1, x2, y2)
x4, y4 = func(x2, y2, x3, y3)
print("{} {} {} {}".format(x3, y3, x4, y4))
"""
if x1 == x2 and y1 < y2:
    hen = y2 - y1
    print("{} {} {} {}".format(x1-hen, y2, x1-hen, y1))
elif x1 > x2 and y1 == y2:
    hen = x1 - x2
    print("{} {} {} {}".format(x2, y2-hen, x1, y1-hen))
elif x1 == x2 and y1 > y2:
    hen = y1 - y2
    print("{} {} {} {}".format(x2+hen, y2, x2+hen, y1))
elif x1 < x2 and y1 == y2:
    hen = x2 - x1
    print("{} {} {} {}".format(x2, y2+hen, x1, y1+hen))
    """

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def abc108_b():
    import sys
    input = sys.stdin.readline

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

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

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


print(abc108_b())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def solve():
    a,b,c,d = tuple(map(int, input().split()))

    p, q = c-a, d-b
    r, s = 0*p-q, p+0*q
    t, u = 0*r-s, r+0*s
    v, w = 0*t-u, t+0*u

    return str(' '.join(map(str,[c+r,d+s,c+r+t,d+s+u])))

if __name__ == '__main__':
    print(solve())

Submission status: Accepted

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

Submission status: Accepted

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

x = x2 - x1
y = y2 - y1

x3 = x2 - y
y3 = y2 + x

x4 = x1 - y
y4 = y1 + x

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def iin(): return int(input())
def nl(): return list(map(int, input().split()))
def ary(r, c, v): return [[v for _ in range(c)] for _ in range(r)]

x1, y1, x2, y2 = nl()
tx, ty = (-1) * (y2 - y1), (x2 - x1)
x3 = x2 + tx
y3 = y2 + ty

tx, ty = (-1) * (y3 - y2), (x3 - x2)
x4 = x3 + tx
y4 = y3 + ty

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
# coding: utf-8

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

dx = x2 - x1
dy = y2 - y1

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

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:
N = input().split()

import math

x1 = int(N[0])
y1 = int(N[1])
x2 = int(N[2])
y2 = int(N[3])


def solve1(x1, y1, x2, y2):
    x4 = x1 + y1 - y2
    y4 = y1 - x1 + x2
    x3 = x2 - y2 + y1
    y3 = y2 + x2 - x1

    return x3, y3, x4, y4


a = solve1(x1, y1, x2, y2)
print(a[0], a[1], a[2], a[3])

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from math import cos, sin, pi
x1, y1, x2, y2 = map(int, input().split())
def rot(x1, y1, x2, y2):
    x = (x2 - x1) * cos(pi / 2) - (y2 - y1) * sin(pi / 2) + x1
    y = (x2 - x1) * sin(pi / 2) + (y2 - y1) * cos(pi / 2) + y1
    return x, y
x4, y4 = rot(x1, y1, x2, y2)
x3, y3 = rot(x4, y4, x1, y1)
print(*(round(s) for s in (x3, y3, x4, y4)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [int(i) for i in input().split()]
l1 = a[2] - a[0]
l2 = a[3] - a[1]
print(-l2 + a[2], l1+a[3],-l2+a[0],l1+a[1])

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

x_dif = x2 - x1
y_dif = y2 - y1

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

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:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

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

dx1 = x2 - x1
dy1 = y2 - y1

x3 = x2 - dy1
y3 = y2 + dx1
x4 = x3 - dx1
y4 = y3 - dy1

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

Submission status: Accepted

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:

def main():
    lst = list(map(int,input().split()))

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

    #print(lst[1]-y)
    #print(lst[3]+x)

    x3 = lst[2]-y
    y3 = lst[3]+x

    x4 = x3 - x
    y4 = y3 - y

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


if __name__ == "__main__":
        main()

Submission status: Accepted

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
import numpy as np
x1,y1,x2,y2=map(int,input().split(" "))

v1=np.array([x1,y1])
v2=np.array([x2,y2])

Rr=np.array([[0,1],
             [-1,0]])
Rl=np.array([[0,-1],
             [1,0]])

v4=np.dot(Rl,(v2-v1))+v1
v3=v4+(v2-v1)

print("{} {} {} {}".format(v3[0],v3[1],v4[0],v4[1]))

Submission status: Accepted

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

vx, vy = x2-x1, y2-y1

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x = [0]*5
y = [0]*5

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[3] - dx
y[4] = y[3] - dy

print(str(x[3]),' ',str(y[3]),' ',str(x[4]),' ',str(y[4]))

Submission status: Accepted

Solution code:
import  math

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

height = y2-y1
width = x2-x1

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
A=input()
A=A.rstrip().split(" ")
x1=int(A[0])
y1=int(A[1])
x2=int(A[2])
y2=int(A[3])
#print(x1,y1,x2,y2)
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:
import sys

ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: [int(x) for x in ns().split()]
nall = lambda: [int(x) for x in sys.stdin.readlines()]
sall = lambda: sys.stdin.readlines()

def main():
    x1, y1, x2, y2 = na()
    x3 = x2 - (y2-y1)
    y3 = y2 + (x2-x1)
    x4 = x1 - (y2-y1)
    y4 = y1 + (x2-x1)

    print(x3, y3, x4, y4)

main()

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = [int(i) for i in 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())
x3 = x2 + (y1 - y2)
y3 = y2 - (x1 - x2)
x4 = x3 + (x1 - x2)
y4 = y3 + (y1 - y2)
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
vecAB=[x2-x1,y2-y1]
vecAD=[-vecAB[1],vecAB[0]]
print(x2+vecAD[0],y2+vecAD[1],x1+vecAD[0],y1+vecAD[1],)

Submission status: Accepted

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

d1 = x2 - x1
d2 = y2 - y1

x3,y3 = x2-d2,y2+d1
x4,y4 = x1-d2,y1+d1

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("{} {} {} {}".format((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 + y1 - y2
y4 = y1 + x2 - x1
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
import numpy as np

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

# x1, y1, x2, y2 = 0,0,0,1

a1 = np.array([x1, y1])
a2 = np.array([x2, y2])

v = a2 - a1
S = np.array([[0, -1], [1, 0]])

a3 = a2 + np.dot(S, v)
SS = np.dot(S, S)
a4 = a3 + np.dot(SS, v)

ans = [a3[0], a3[1], a4[0], a4[1]]
ans = map(str, ans)
print(" ".join(ans))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = (int(v) for v in input().split())
xd, yd = x2-x1, y2-y1

xd, yd = -yd, xd
x3, y3 = x2+xd, y2+yd
xd, yd = -yd, xd
x4, y4 = x3+xd, y3+yd
print(x3, y3, x4, y4)

Submission status: Accepted

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

diff_x = x1 - x2
diff_y = y1 - y2
x3, y3 = x2 + diff_y, y2 - diff_x
x4, y4 = x3 + diff_x, y3 + diff_y
print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

INF = float('inf')


def inpl(): return list(map(int, input().split()))


x1, y1, x2, y2 = inpl()

diff_y = y2 - y1
diff_x = x2 - x1
ans1 = [x2 - diff_y, y2 + diff_x]
ans2 = [ans1[0] - diff_x, ans1[1] - diff_y]
ans = ans1 + ans2
ans = ' '.join(map(str, ans))
print(ans)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = [int(i) for i in 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 = [int(x) for x in input().split()]

def calc(x1,y1,x2,y2):
    return x2-y2+y1,y2+x2-x1

x3,y3 = calc(x1,y1,x2,y2)
x4,y4 = calc(x2,y2,x3,y3)

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
x1,y1,x2,y2=map(int,input().split())
deltax=x2-x1
deltay=y2-y1
print(str(x2-deltay)+" "+str(y2+deltax)+" "+str(x1-deltay)+" "+str(y1+deltax))

Submission status: Accepted

Solution code:
u,v,w,z=map(int,input().split())

a=w-(z-v)
b=z+w-u
c=u-(z-v)
d=v+w-u

print(a)
print(b)
print(c)
print(d)

Submission status: Accepted

Solution code:
xy=input().split()
x1=int(xy[0])
y1=int(xy[1])
x2=int(xy[2])
y2=int(xy[3])
a=x2-x1
b=y2-y1
print(x2-b,y2+a,x1-b,y1+a)

Submission status: Accepted

Solution code:
# coding: utf-8

x1,y1,x2,y2 = list(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())

difx = x2 - x1
dify = y2 - y1
dif = difx + dify

x3 = x2 - dify
x4 = x3 - difx
y3 = y2 + difx
y4 = y3 - dify

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

Submission status: Accepted

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

a = x_2 - x_1
b = y_2 - y_1

x_3 = x_2 - b
y_3 = y_2 + a
x_4 = x_3 - a
y_4 = y_3 - b

print(x_3, y_3, x_4, y_4)

Submission status: Accepted

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

a_y=(y2-y1)
a_x=(x2-x1)

y3=y2+a_x
x3=x2-a_y
x4=x3-a_x
y4=y3-a_y

print(x3, y3, x4, y4)

Submission status: Accepted

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

#点2を平行移動
x2b = x2 - x1
y2b = y2 - y1

#点2bを90度回転
x4b = -y2b
y4b = x2b

#点2bを平行移動して点2にする
x4 = x4b + x1
y4 = y4b + y1

#2bと4bを足し合わせて点3bを求める
x3b = x2b + x4b
y3b = y2b + y4b
#点3bを点3に平行移動
x3 = x3b + x1
y3 = y3b + y1

print(x3,y3,x4,y4)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

v2_x = -v_y
v2_y = v_x

x_3 = x_2 +v2_x
y_3 = y_2 +v2_y

x_4 = x_1 + v2_x
y_4 = y_1 + v2_y

print(x_3,y_3,x_4,y_4)

Submission status: Accepted

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

x12 = x2 - x1
y12 = y2 - y1

x3 = x2 - y12
y3 = y2 + x12

x4 = x3 - x12
y4 = y3 - y12

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

Submission status: Accepted

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

vec_12_x = x2 -x1
vec_12_y = y2 -y1

vec_23_x = -vec_12_y
vec_23_y = vec_12_x

vec_34_x = -vec_12_x
vec_34_y = -vec_12_y

print(x2+vec_23_x, y2+ vec_23_y, x2+vec_23_x+vec_34_x, y2+vec_23_y+vec_34_y)

Submission status: Accepted

Solution code:
na = lambda: list(map(int, input().split()))
x1, y1, x2, y2 = na()
xl = x2-x1
yl = y2-y1
print(x2-yl, y2+xl, x2-yl-xl, y2+xl-yl)

Submission status: Accepted

Solution code:
import numpy as np

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

mat = np.array([[0,1],[-1,0]])
vec = [x2 - x1, y2 - y1]
rot_vec = -mat.dot(vec)
x4, y4 = rot_vec + np.array([x1,y1])
x3 = x4 + vec[0]
y3 = y4 + vec[1]

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 = 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())
vector = (x2 - x1, y2 - y1)
print(x2 - vector[1], y2 + vector[0], x2 - vector[1] - vector[0], y2 + vector[0] - vector[1])

Submission status: Accepted

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

moveX = x2 - x1
moveY = y2 - y1

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = (int(i) for i in 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:
x1, y1, x2, y2 = [int(i) for i in input().split()]

x = x2 - x1
y = y2 - y1

x23 = -y
y23 = x

x3 = x2 + x23
y3 = y2 + y23

x4 = x1 + x23
y4 = y1 + y23

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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


v = [x2-x1,y2-y1]
v1 = [-v[1],v[0]]
v2 = [-v[0],-v[1]]

x3,y3 = x2+v1[0],y2+v1[1]
x4,y4 = x3+v2[0],y3+v2[1]
print(x3,y3,x4,y4)