Problem:
 Score : 200 points    Problem Statement There is a square in the xy -plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order.
(Assume that the positive x -axis points right, and the positive y -axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2) , but he has forgot (x_3,y_3) and (x_4,y_4) .  Given x_1,x_2,y_1,y_2 , restore x_3,y_3,x_4,y_4 . It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.      Constraints  |x_1|,|y_1|,|x_2|,|y_2| \leq 100  (x_1,y_1) ≠ (x_2,y_2)  All values in input are integers.         Input Input is given from Standard Input in the following format:  x_1  y_1  x_2  y_2       Output Print x_3,y_3,x_4 and y_4 as integers, in this order.        Sample Input 1 0 0 0 1      Sample Output 1 -1 1 -1 0  (0,0),(0,1),(-1,1),(-1,0) is the four vertices of a square in counter-clockwise order.
Note that (x_3,y_3)=(1,1),(x_4,y_4)=(1,0) is not accepted, as the vertices are in clockwise order.       Sample Input 2 2 3 6 6      Sample Output 2 3 10 -1 7       Sample Input 3 31 -41 -59 26      Sample Output 3 -126 -64 -36 -131

Solution (Python):
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))

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

a = x2-x1
b = y2-y1

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

Solution (Python):
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))

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

Solution (Python):
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))

Solution (Python):
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))

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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)

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

a = x2 - x1
b = y2 - y1

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

Solution (Python):
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))

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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)

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

Solution (Python):
x1, y1, x2, y2 = map(int, input().strip().split())
distanceX = x2 - x1
distanceY = y2 - y1
print(x2 - distanceY, y2 + distanceX, x1 - distanceY, y1 + distanceX)

Solution (Python):
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()

Solution (Python):



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

Solution (Python):
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))

Solution (Python):
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))

Solution (Python):
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)

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):

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

Solution (Python):
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))

Solution (Python):
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))

Solution (Python):
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])

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):

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)

Solution (Python):


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)

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):
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])

Solution (Python):

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):

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)

Solution (Python):

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)

Solution (Python):
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=" ")

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

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

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

Solution (Python):
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)

Solution (Python):



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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

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

diffx = x2 - x1
diffy = y2 - y1

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

Solution (Python):



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

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

Solution (Python):
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)

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

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

    ans = editorial(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()

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

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

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

Solution (Python):


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

Solution (Python):
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)

Solution (Python):
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)

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

Solution (Python):
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)

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

Solution (Python):
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))

Solution (Python):



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

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

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

Solution (Python):
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)

Solution (Python):
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))

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

Solution (Python):
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)

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

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)

Solution (Python):
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()

Solution (Python):
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)

Solution (Python):
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))

Solution (Python):
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)

Solution (Python):


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

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

Solution (Python):
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]))

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

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

Solution (Python):
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)

Solution (Python):
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])

Solution (Python):
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())

Solution (Python):


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

Solution (Python):
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)

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

Solution (Python):
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)

Solution (Python):
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])

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

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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="")

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

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

dx = x2 - x1
dy = y2 - y1

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

Solution (Python):
a,b,c,d = (int(i) for i in input().split())
print(b+c-d,c+d-a,a+b-d,b+c-a)

Solution (Python):
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))

Solution (Python):
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)

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

tmpx = x2 - x1
tmpy = y2 - y1

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

Solution (Python):
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)

Solution (Python):
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])

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

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

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

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

Solution (Python):
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))

Solution (Python):
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]

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):

x1,y1,x2,y2=map(int,input().split())
vec_x,vec_y=x2-x1,y2-y1
print(x2-vec_y, y2+vec_x, x1-vec_y, y1+vec_x)

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

dx, dy = x2 - x1, y2 - y1

dx, dy = -dy, dx
x3, y3 = x2 + dx, y2 + dy

dx, dy = -dy, dx
x4, y4 = x3 + dx, y3 + dy

print(x3, y3, x4, y4)

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


A=0

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

print(x3, y3, x4, y4)

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

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

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

vector_x, vector_y = x2 - x1, y2 - y1
print(x2 - vector_y, y2 + vector_x, x1 - vector_y, y1 + vector_x)

Solution (Python):
ls = raw_input().split()
l=[0,0,0,0]
l[0]=int(ls[0])
l[1]=int(ls[1])
l[2]=int(ls[2])
l[3]=int(ls[3])
ax=l[1]-l[3]
ay=l[2]-l[0]

x3=str(ax+l[2])
y3=str(ay+l[3])
x4=str(ax+l[0])
y4=str(ay+l[1])
ans=x3+" "+y3+" "+x4+" "+y4
print ans

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

Solution (Python):
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)

Solution (Python):
val = input().split()
val = [int(i) for i in val]

a, b, c, d = val

x1 = val[2] - val[0]
y1 = val[3] - val[1]

import numpy as np

if x1 * y1 > 0:
    x2 = -1 * np.sign(x1) * abs(y1)
    y2 = np.sign(y1) * abs(x1)
    x3 = np.sign(x2) * abs(x1)
    y3 = -1 * np.sign(y2) * abs(y1)
elif x1 == 0:
    x2 = -1 * y1
    y2 = 0
    x3 = 0
    y3 = x2
elif y1 == 0:
    x2 = 0
    y2 = x1
    x3 = -1 * x1
    y3 = 0
else:
    x2 = np.sign(x1) * abs(y1)
    y2 = -1 * np.sign(y1) * abs(x1)
    x3 = -1 * np.sign(x2) * abs(x1)
    y3 = np.sign(y2) * abs(y1)

e = c + x2
f = d + y2
g = e + x3
h = f + y3

print(e, f, g, h)

Solution (Python):
from math import *
x1,y1,x2,y2=map(int,input().split())
b=x2-x1
h=y2-y1

d=sqrt(h**2+b**2)

if(h==0):
    if(x2>x1):
        x3=x2
        y3=y2+d
        x4=x1
        y4=y1+d
    else:
        x3=x2
        y3=y2-d
        x4=x1
        y4=y1-d
    print(x3,round(y3),x4,round(y4))
else:
    ratio=b/h
    val1=sqrt((d**2)/(1+ratio**2))
    val2=sqrt(((d**2)*(ratio**2))/(1+ratio**2))
    if(x1<=x2 and y1<=y2):
        x3=x2-val1
        y3=y2+val2
        x4=x1-val1
        y4=y1+val2
    elif(x1>=x2 and y1<=y2):
        x3=x2-val1
        y3=y2-val2
        x4=x1-val1
        y4=y1-val2
    elif(x2<x1 and y2<y1):
        x3=x2+val1
        y3=y2-val2
        x4=x1+val1
        y4=y1-val2
    else:
        x3=x2+val1
        y3=y2+val2
        x4=x1+val1
        y4=y1+val2
    print(round(x3),round(y3),round(x4),round(y4))

Solution (Python):
ini=map(int, raw_input().split())

ans=[]

ans.append(ini[2]-(ini[3]-ini[1]))
ans.append(ini[3]+(ini[2]-ini[0]))
ans.append(ini[0]+ans[0]-ini[2])
ans.append(ini[1]+ans[1]-ini[3])
for i in ans:
    print i,

Solution (Python):
raw = input()

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

c = '0'
d = '0'

if x1 > x2:
    d1 = x1 - x2
    c = '1'
else:
    d1 = x2 - x1
 
if y1 > y2:
    d2 = y1 - y2
    d = '1'
else:
    d2 = y2 - y1
    
if c == '1':
    y3 = y2 - d1

    y4 = y1 - d1

else:
    y3 = y2 + d1

    y4 = y1 + d1

if d == '1':
    x3 = x2 + d2

    x4 = x1 + d2
else:
    x3 = x2 - d2
    
    x4 = x1 - d2

print(x3,y3,x4,y4)