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:
from sys import stdin

x1, y1, x2, y2 = [int(a) for a in stdin.readline().rstrip().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(" "))

x3 = x2 - (y2 - y1)
y3 = y2 + (x2 - x1)
x4 = x3 - (y3 - y2)
y4 = y3 + (x3 - x2)
ret = "{0} {1} {2} {3}\n".format(x3, y3, x4, y4)

print (ret)

Submission status: Accepted

Solution code:
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:
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_1-(y_2-y_1)
y_4 = y_1+(x_2-x_1)
print(x_3,y_3,x_4,y_4)

Submission status: Accepted

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

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, raw_input().split())
vx = x2-x1
vy = y2-y1
nx = -vy
ny = vx
x3 = x2 + nx
y3 = y2 + ny
nnx = -ny
nny = nx
x4 = x3 + nnx
y4 = y3 + nny
print x3, y3, x4, y4

Submission status: Accepted

Solution code:
def rot(x0, y0, x1, y1):
    a = x0 - x1
    b = y0 - y1
    return (b + x1,  -a + y1)

x1, y1, x2, y2 = [int(i) for i in input().split()]
x3, y3 = rot(x1, y1, x2, y2)
x4, y4 = rot(x2, y2, x3, y3)
print(x3, y3, x4, y4)

Submission status: Accepted

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

tempx = x2 - x1
tempy = y2 - y1

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
x1, y1, x2, y2 = map(int, input().split())
dy = y2 - y1
dx = x2 - x1
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())
dis_x = x2 - x1
dis_y = y2 - y1
print(x2-dis_y, y2+dis_x, x1-dis_y, y1+dis_x)

Submission status: Accepted

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

h = inp[2] - inp[0]
w = inp[3] - inp[1]

ans.append(inp[2]-w)
ans.append(inp[3]+h)

ans.append(ans[0]-h)
ans.append(ans[1]-w)

for a in ans:
    print(a , end=" ")

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
B - Ruined Square
各点を複素数として管理する
点間の差のベクトルを jかけて 回転させる
"""

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

square = []
for i in range(4):
    square.append(complex(0, 0))

square[0] = complex(x1, y1)
square[1] = complex(x2, y2)

dist = square[1] - square[0]

out = ""
for i in range(2, 4):
    dist = dist * complex(0, 1)
    square[i] = square[i - 1] + dist
    out += ("%d %d " % (square[i].real, square[i].imag)) 

print(out)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

a = x2-x1
b = y2-y1

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
x2_x1 = x2-x1
y2_y1 = y2-y1
ans = []
x4 = x1-y2_y1
y4 = y1+x2_x1
x3 = x2-y2_y1
y3 = y2+x2_x1
print(str(x3)+" " +str(y3)+" "+str(x4)+" "+str(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("{} {} {} {}".format(x3, y3, x4, y4))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
diff_x, diff_y = x2 - x1, y2 - y1
print('%s %s %s %s'%(x2 - diff_y, y2 + diff_x, x1 - diff_y, y1 + diff_x))

Submission status: Accepted

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

diff_x = x2 - x1
diff_y = y2 - y1

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

print("{} {} {} {}".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:
import numpy as np
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())

a = x2 - x1
b = y2 - y1

print("{} {} {} {}".format(x2-b, y2+a, x1-b, y1+a))

Submission status: Accepted

Solution code:
import numpy as np
x1, y1, x2, y2 = list(map(int, input().split()))
z1 = [
    [x1],
    [y1]
]
z1 = np.matrix(z1)
z2 = [
    [x2],
    [y2]
]
z2 = np.matrix(z2)
v1 = z2 - z1
R = [
    [0, -1],
    [1, 0]
]
v2 = np.dot(R, v1)
z3 = z2 + v2
v3 = np.dot(R, v2)
z4 = z3 + v3
ans = [str(z3[0, 0]), str(z3[1, 0]), str(z4[0, 0]), str(z4[1, 0])]
print(" ".join(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2=[int(s) for s in 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 = map(int, input().strip().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().strip().split())
distanceX = x2 - x1
distanceY = y2 - y1
print(x2 - distanceY, y2 + distanceX, x1 - distanceY, y1 + distanceX)

Submission status: Accepted

Solution code:
class Point2d:
    
    def __init__(self, x, y):
        self.x, self.y = x, y

def get3rd(p0, p1):
    return Point2d(p1.x + p0.y - p1.y, p1.y + p1.x - p0.x)

def solution(p0, p1):
    p2 = get3rd(p0, p1)
    p3 = get3rd(p1, p2)
    return p2, p3

def main():
    raw = [int(i) for i in raw_input().strip().split()]
    p2, p3 = solution(Point2d(raw[0], raw[1]), Point2d(raw[2], raw[3]))
    print '%d %d %d %d' % (p2.x, p2.y, p3.x, p3.y)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# B
# coding: utf-8

def main():
    x1, y1, x2, y2 = [int(n) for n in input().split(' ')]
    def rotate(x1, y1, x2, y2):
        return y1 - y2 + x2, y2 + x2 - x1
    x3, y3 = rotate(x1, y1, x2, y2)
    x4, y4 = rotate(x2, y2, x3, y3)
    print(x3, y3, x4, y4)

if __name__ == '__main__':
    main()

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("%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("%d %d %d %d" % (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=x1-(y2-y1)
y4=y1+(x2-x1)
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
a, b, c, d = map(int, raw_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+y1-y2
y3=y2+x2-x1
x4=x3+y2-y3
y4=y3+x3-x2

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
x3 = x2 + y1 - y2
y3 = y2 - x1 + x2
x4 = x1 + x3 - x2
y4 = y1 + y3 - y2
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=x1-(y2-y1)
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())


vec = np.array([x2-x1,y2-y1])

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

nvec = np.dot(rot,vec)

x3 = x2+nvec[0]
y3 = y2+nvec[1]

nvec = np.dot(rot,nvec)

x4 = x3+nvec[0]
y4 = y3+nvec[1]

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

Submission status: Accepted

Solution code:
# cook your dish here
import numpy as np
if __name__ == '__main__':
    xy = [int(i) for i in input().split()]
    a1 = np.array([xy[0], xy[1]])
    a2 = np.array([xy[2], xy[3]])
    b = a2 - a1
    r = np.pi / 2
    rot = np.matrix((
        (np.cos(r), np.sin(r)),
        (-np.sin(r), np.cos(r))
    ))
    c = np.dot(b, rot)
    a3 = a2+c
    a4 = a1+c
    print('{} {} {} {}'.format(int(np.round(a3[0,0])), int(np.round(a3[0,1])), int(np.round(a4[0,0])), int(np.round(a4[0,1]))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

P_1 = np.array([x_1, y_1])
P_2 = np.array([x_2, y_2])
vec_12 = P_2 - P_1
vec_13 = np.array([-vec_12[1], vec_12[0]])
P_3 = P_1 + vec_13
P_4 = P_2 + vec_13
print(P_4[0], P_4[1], P_3[0], P_3[1])

Submission status: Accepted

Solution code:
def rotleft(dx,dy):
  return -dy, dx

s = input().split()
x1 = int(s[0])
y1 = int(s[1])
x2 = int(s[2])
y2 = int(s[3])

dx = x2 - x1
dy = y2 - y1

dx,dy = rotleft(dx,dy)

x3 = x2 + dx
y3 = y2 + dy

dx,dy = rotleft(dx,dy)

x4 = x3 + dx
y4 = y3 + dy

print("%d %d %d %d" % (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:
p = [int(i) for i in input().split()]
x, y = p[2]-p[0], p[3]-p[1]
d = abs(x+y)
print("%d %d %d %d"%(p[2]-y,p[3]+x,p[2]-y-x,p[3]+x-y))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

a = [x_2-x_1,y_2-y_1]

x_3 ,y_3 = x_2-a[1], y_2+a[0]

x_4, y_4 = x_3-a[0], y_3-a[1]

print(x_3, y_3, x_4, y_4)

Submission status: Accepted

Solution code:
xa,ya,xb,yb=map(int,input().split())
xc=xb-yb+ya
yc=yb+xb-xa
xd=xa-yb+ya
yd=ya+xb-xa
print('{} {} {} {}'.format(xc,yc,xd,yd))

Submission status: Accepted

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

v2x = -v1y
v2y = v1x
v3x = -v2y
v3y = v2x
x3 = x2 + v2x
y3 = y2 + v2y
x4 = x3 + v3x
y4 = y3 + v3y
print(x3, y3, x4, y4)

Submission status: Accepted

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

def found_coordinate(x0, y0, x1, y1):
  x = x1 + y0 - y1
  y = y1 + x1 - x0
  return(x, y)

ans1 = found_coordinate(x1, y1, x2, y2)
ans2 = found_coordinate(x2, y2, ans1[0], ans1[1])
print(ans1[0], ans1[1], ans2[0], ans2[1])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math,string,itertools,fractions,heapq,collections,re,array,bisect
import numpy as np

def ln():
    return map(int, input().split())

XY = list(ln())
p1 = np.array(XY[0:2])
p2 = np.array(XY[2:4])

p12 = p2 - p1

p4  = np.array((-1*p12[1],p12[0])) + p1
p3  = p12 + p4

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

Submission status: Accepted

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

d_x = x2 - x1
d_y = y2 - y1

d_x, d_y = -d_y, d_x
x3 = x2 + d_x
y3 = y2 + d_y

d_x, d_y = -d_y, d_x
x4 = x3 + d_x
y4 = y3 + d_y

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
# 入力
import sys
stdin = sys.stdin

def li(): return [int(x) for x in stdin.readline().split()]
def li_(): return [int(x)-1 for x in stdin.readline().split()]
def lf(): return [float(x) for x in stdin.readline().split()]
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(ns())
def nf(): return float(ns())

x1, y1, x2, y2 = li()

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

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
# 入力
import sys
stdin = sys.stdin

def li(): return [int(x) for x in stdin.readline().split()]
def li_(): return [int(x)-1 for x in stdin.readline().split()]
def lf(): return [float(x) for x in stdin.readline().split()]
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(ns())
def nf(): return float(ns())

x1, y1, x2, y2 = li()

mean = (abs(x2-x1) + abs(y2-y1)) / 2
cent_x, cent_y = 0,0

if x1 >= x2 and y2 >= y1:
    cent_x, cent_y = x1-mean, y2-mean
    
elif x1 >= x2 and y1 >= y2:
    cent_x, cent_y = x2+mean, y1-mean
    
elif x2 >= x1 and y1 >= y2:
    cent_x, cent_y = x1+mean, y2+mean
    
else:
    cent_x, cent_y = x2-mean, y1+mean
    
x2_v, y2_v = x2-cent_x, y2-cent_y

x3_v, y3_v = -y2_v, x2_v 
x4_v, y4_v = -y3_v, x3_v

x3, y3 = int(x3_v+cent_x), int(y3_v+cent_y)
x4, y4 = int(x4_v+cent_x), int(y4_v+cent_y)

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,sep=" ")

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
v1 = c-a
v2 = d-b
x3 = c-v2
y3 = d+v1
x4 = x3-v1
y4 = y3-v2
print(x3,y3,x4,y4)

Submission status: Accepted

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

x_diff=x2-x1
y_diff=y2-y1

x3,y3 = x2-y_diff, y2+x_diff
x4,y4 = x1-y_diff, y1+x_diff

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())
dx = x2 - x1
dy = y2 - y1
print("{} {} {} {}".format((x2 - dy), (y2 + dx), (x1 - dy), (y1 + dx)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys

def main():
    x1, y1, x2, y2 = map(int, sys.stdin.readline().split())
    dx = x2 - x1
    dy = y2 - y1
    print(x2 - dy, y2 + dx, x1 - dy, y1 + dx)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

x1,y1,x2,y2 = inpl()
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())
y3 = x2 - x1 + y2
x3 = y1 - y2 + x2
y4 = x2 - x1 + y1
x4 = y1 - y2 + 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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

diffx = x2 - x1
diffy = y2 - y1

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

Submission status: Accepted

Solution code:
# coding: utf-8


def main():
    x1, y1, x2, y2 = map(int, input().split())
    x_diff = x2 - x1
    y_diff = y2 - y1

    x3 = x2 - y_diff
    y3 = y2 + x_diff

    x4 = x1 - y_diff
    y4 = y1 + x_diff

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


if __name__ == '__main__':
    main()

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())

xd= x2-x1
yd= y2-y1

if xd >=0 and yd >= 0:
    x3 = x2 - abs(yd)
    y3 = y2 + abs(xd)
    x4 = x1 - abs(yd)
    y4 = y1 + abs(xd)

elif xd <= 0 and yd >= 0:

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

elif xd <= 0 and yd <= 0:

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

elif xd >= 0 and yd <= 0:

    x3 = x2 + abs(yd)
    y3 = y2 + abs(xd)
    x4 = x1 + abs(yd)
    y4 = y1 + abs(xd)


print(x3,y3,x4,y4)

Submission status: Accepted

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

    ans = editorial(x1, y1, x2, y2)
    # assert ans == twi(x1, y1, x2, y2)
    print(*ans)


def twi(x1, y1, x2, y2):
    """
    https://twitter.com/akensho/status/1035924165205716992
    https://twitter.com/hogeover30/status/1035903937830764545
    """
    import math
    cos90 = int(math.cos(math.pi / 2))
    sin90 = int(math.cos(math.pi / 2))

    x = x2 - x1
    y = y2 - y1
    x4 = x * cos90 - y * sin90 + x1
    y4 = x * sin90 + y * cos90 + y1

    x = x1 - x4
    y = y1 - y4
    x3 = x * cos90 - y * sin90 + x4
    y3 = x * sin90 + y * cos90 + y4

    return x3, y3, x4, y4


def editorial(x1, y1, x2, y2):
    x = x2 - x1
    y = y2 - y1

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

    return x3, y3, x4, y4


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

zx = x1 - x2
zy = y1 - y2

thita = - math.pi/2
x3 = zy + x2
y3 = -zx + y2

x4 = zy + x1
y4 = -zx + y1

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = list(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_diff = x1 - x2
y_diff = y2 - y1

x4 = x1 - y_diff
y4 = y1 - x_diff
x3 = x2 - y_diff
y3 = y2 - x_diff

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(str(x2 - Y) + ' ' + str(y2 + X) + ' ' + str(x1 - Y) + ' ' + str(y1 + X))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d = map(int,input().split())
print("{} {} {} {}".format(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 + y1 - y2
y3 = y2 + x2 - x1

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

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

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:
a,b,c,d=map(int,input().split())
dx,dy=c-a,d-b
print(c-dy,d+dx,a-dy,b+dx)

Submission status: Accepted

Solution code:
import math

x1,y1,x2,y2=(int(i) for i in input().split())
x3,y3,x4,y4=0,0,0,0
Xsa=x2-x1
Ysa=y2-y1
x3=x2-Ysa
y3=y2+Xsa
x4=x3-Xsa
y4=y3-Ysa

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

Submission status: Accepted

Solution code:
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:
x1,y1,x2,y2 = (int(i) for i in 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:
nums = list(map(int, input().split()))
x = (nums[2] - nums[0])
y = (nums[3] - nums[1])
# kyori = sqrt((x*x) + (y*y))
n1 = nums[2] - y
n2 = nums[3] + x
print(n1, end="")
print(" ", end="")
print(n2, end="")
print(" ", end="")
print(n1 - x, end="")
print(" ", end="")
print(n2 - y)

Submission status: Accepted

Solution code:
def run(x1, y1, x2, y2):
    dx = x2 - x1
    dy = y2 - y1
    x3 = x2 - dy
    y3 = y2 + dx
    x4 = x3 - dx
    y4 = y3 - dy
    return '{} {} {} {}'.format(x3, y3, x4, y4)


def read_line():
    x1, y1, x2, y2 = map(int, input().split())
    return (x1, y1, x2, y2)


def main():
    x1, y1, x2, y2 = read_line()
    ret = run(x1, y1, x2, y2)
    print(ret)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#abc108b

x1,y1,x2,y2=map(int,raw_input().split())
x=x2-x1
y=y2-y1
print x2-y,y2+x,x1-y,y1+x

Submission status: Accepted

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

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:
a,b,c,d=map(int,input().split())
print(b+c-d,c+d-a,a+b-d,b+c-a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
s=input().split()
l=[int(s[i]) for i in range(4)]
v1=np.array([l[0],l[1]])
v2=np.array([l[2],l[3]])
v=v2-v1
A=np.array([[0,-1],[1,0]])
v3=v2+np.dot(A,v)
v=v3-v2
v4=v3+np.dot(A,v)
print(v3[0],v3[1],v4[0],v4[1])

Submission status: Accepted

Solution code:
def m():
    a, b, c, d = map(int, input().split())
    x = c-a
    y = d-b
    return "{} {} {} {}".format(c-y,d+x, a-y,b+x)


print(m())

Submission status: Accepted

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

def main():
    x1, y1, x2, y2 = 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(x3, y3, x4, y4)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

x_dif = x2 - x1
y_dif = y2 - y1
print(x2-y_dif, y2+x_dif, x1-y_dif, y1+x_dif)

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int, raw_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())

dx,dy = x2-x1,y2-y1
x3,y3 = x2-dy,y2+dx
x4,y4 = x1-dy,y1+dx
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
l = map(int, input().split())
a=list(l)
x1=a[0]
y1=a[1]
x2=a[2]
y2=a[3]
x=x2-x1
y=y2-y1
x3=x2-y
y3=y2+x
x4=x1-y
y4=y1+x
c=[x3, y3, x4, y4]
print(c[0], c[1], c[2], c[3])

Submission status: Accepted

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

x3 = xy[2] - (xy[3]-xy[1])
y3 = xy[3] - (xy[0]-xy[2])
x4 = xy[0] - (xy[3]-xy[1])
y4 = xy[1] - (xy[0]-xy[2])

print(x3,y3,x4,y4)

Submission status: Accepted

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

if xy[2] - xy[0] == 0:
    if xy[3] > xy[1]:
        x3 = xy[2] - (xy[3]-xy[1])
        y3 = xy[3] - (xy[0]-xy[2])
        x4 = xy[0] - (xy[3]-xy[1])
        y4 = xy[1] - (xy[2]-xy[0])
    else:
        x3 = xy[2] - (xy[3]-xy[1])
        y3 = xy[3] - (xy[0]-xy[2])
        x4 = xy[0] - (xy[3]-xy[1])
        y4 = xy[1] - (xy[0]-xy[2])
else:
    if xy[2] > xy[0]:
        x3 = xy[2] - (xy[3]-xy[1])
        y3 = xy[3] - (xy[0]-xy[2])
        x4 = xy[0] - (xy[3]-xy[1])
        y4 = xy[1] - (xy[0]-xy[2])
    else:
        x3 = xy[2] - (xy[3]-xy[1])
        y3 = xy[3] - (xy[0]-xy[2])
        x4 = xy[0] - (xy[3]-xy[1])
        y4 = xy[1] - (xy[0]-xy[2])

print(x3,y3,x4,y4)

Submission status: Accepted

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

if xy[2] - xy[0] == 0:
    if xy[3] > xy[1]:
        x3 = xy[2] - (xy[3]-xy[1])
        y3 = xy[3] - (xy[2]-xy[0])
        x4 = xy[0] - (xy[3]-xy[1])
        y4 = xy[1] - (xy[2]-xy[0])
    else:
        x3 = xy[2] - (xy[3]-xy[1])
        y3 = xy[3] - (xy[0]-xy[2])
        x4 = xy[0] - (xy[3]-xy[1])
        y4 = xy[1] - (xy[0]-xy[2])
else:
    if xy[2] > xy[0]:
        x3 = xy[2] - (xy[3]-xy[1])
        y3 = xy[3] - (xy[0]-xy[2])
        x4 = xy[0] - (xy[3]-xy[1])
        y4 = xy[1] - (xy[0]-xy[2])
    else:
        x3 = xy[2] - (xy[3]-xy[1])
        y3 = xy[3] - (xy[0]-xy[2])
        x4 = xy[0] - (xy[3]-xy[1])
        y4 = xy[1] - (xy[0]-xy[2])

print(x3,y3,x4,y4)

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

print(x_2-B,y_2+A,x_1-B,y_1+A)

Submission status: Accepted

Solution code:
import numpy as np

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


def get_rotation_matrix(rad):
    rot = np.array([[np.cos(rad), -np.sin(rad)],
                    [np.sin(rad), np.cos(rad)]], dtype=np.int32)
    return rot


X1 = x1 - x2
Y1 = y1 - y2
r = get_rotation_matrix(np.pi / 2)
rotated = np.dot(-r, np.asarray([X1, Y1], dtype=np.int32))
print(str(rotated[0] + x2) + " " + str(rotated[1] + y2), end=" ")

X2 = -rotated[0]
Y2 = -rotated[1]
r = get_rotation_matrix(np.pi / 2)
XY4 = np.dot(-r, np.asarray([X2, Y2],dtype=np.int32))
x4 = XY4[0]
y4 = XY4[1]
print(str(x4 + rotated[0] + x2) + " " + str(y4 + rotated[1] + y2), end="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
a,b,c,d = (int(i) for i in input().split())
print(b+c-d,c+d-a,a+b-d,b+c-a)

Submission status: Accepted

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

x = x2 - x1
y = y2 - y1
x3, y3, x4, y4 = x2 - y, y2 + x, x1 - y, y1 + 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(x3, y3, x4, y4)

Submission status: Accepted

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

tmpx = x2 - x1
tmpy = y2 - y1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y,z,w=map(int,input().split())

t=(z-x,w-y)
u=(y-w,z-x)
l=(x-z,y-w)

x3=(z+u[0],w+u[1])
x4=(x3[0]+l[0],x3[1]+l[1])

print(x3[0],x3[1],x4[0],x4[1])

Submission status: Accepted

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

ans = []
for _ in range(2):
    dx, dy = dy, dx
    dx *= (-1)
    x += dx
    y += dy
    ans.append(x)
    ans.append(y)
print(*ans)

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

x3, y3 = x2 - dy, y2 + dx
x4, y4 = x1 - dy, y1 + dx
print(x3, y3, x4, y4)

Submission status: Accepted

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

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

Submission status: Accepted

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

(dx, dy) = (x2 - x1, y2 - y1)
(x3, y3) = (x2 - dy, y2 + dx)
(x4, y4) = (x3 - dx, y3 - dy)
print("%d %d %d %d" % (x3, y3, x4, y4))

Submission status: Accepted

Solution code:
import numpy as np

x1,y1,x2,y2 = map(int, raw_input().split())
R90 = np.array([[0, -1], [1, 0]])
p1 = np.array([x1,y1])
p2 = np.array([x2,y2])
d12 = p2 - p1
d23 = np.dot(R90, d12)
p3 = p2 + d23
p4 = p3 - d12
print p3[0], p3[1], p4[0], p4[1]

Submission status: Accepted

Solution code:
from sys import stdin
x1, y1, x2, y2 = [int(x) for x in stdin.readline().rstrip().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 = [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)