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):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def SS(): return map(str,sys.stdin.readline().rstrip().split())
def II(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

x1,y1,x2,y2 = II()


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

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+(y1-y2)
y4=y1-(x1-x2)

print(x3,y3,x4,y4)

Solution (Python):
import sys
input=sys.stdin.readline
x1,y1,x2,y2=map(int,input().split())
d=(x2-x1,y2-y1)
d=(-d[1],d[0])
x3=x2+d[0]
y3=y2+d[1]
d=(-d[1],d[0])
x4=x3+d[0]
y4=y3+d[1]
print(x3,y3,x4,y4)

Solution (Python):


import sys
input=sys.stdin.readline

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

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):
x,y,z,w = map(int, input().split())

p = z + y - w
q = w + z - x
r = x + y - w
s = y + z - x
print(p,q,r,s)

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

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

Solution (Python):
a, b, c, d = map(int, input().split())
A = c - a
B = d - b
e = c - B
f = d + A
g = a - B 
h = b + A
print(e, f, g, h)

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

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

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

print(x3,y3,x4,y4)

Solution (Python):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())


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

Solution (Python):
ax,ay,bx,by=map(int,input().split())


cx=bx+ay-by
cy=by+bx-ax
dx=ax+ay-by
dy=ay+bx-ax

print("{} {} {} {}".format(cx,cy,dx,dy))

Solution (Python):
from sys import stdin
import numpy as np
def main():
    
    readline=stdin.readline
    x1,y1,x2,y2=map(int,readline().split())
    
    p1=np.array([x1,y1])
    p2=np.array([x2,y2])
    R1=np.array([[0,-1],[1,0]])
    R2=np.array([[0,1],[-1,0]])
    p3=np.dot(R2,(p1-p2))+p2
    p4=np.dot(R1,(p2-p1))+p1
    print(p3[0],p3[1],p4[0],p4[1])

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(x3, y3, x4, y4)

Solution (Python):






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





import numpy as np





rot = np.array([[0, -1], [1, 0]])
vec0 = np.array([x1, y1])
vec1 = np.array([x2-x1, y2-y1])
vec2 = np.dot(rot, vec1)
vec3 = np.dot(rot, vec2)
ans = list(map(str, list(vec0 + vec1 + vec2) + list(vec0 + vec1 + vec2 + vec3)))
print(" ".join(ans))

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



if __name__ == '__main__':
    solve()

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):
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 = x3 - x_diff
y4 = y3 - y_diff

print(x3, y3, x4, y4)

Solution (Python):
import sys
input = sys.stdin.readline


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


def solve(x1, y1, x2, y2):
    v12 = (x2-x1, y2-y1)
    v34 = (-x2+x1, -y2+y1)
    v23 = (-y2+y1, x2-x1)
    x3, y3 = x2 + v23[0], y2 + v23[1]
    x4, y4 = x3 + v34[0], y3 + v34[1]
    return "%d %d %d %d" % (x3, y3, x4, y4)


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))

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

xdiff = x2 - x1
ydiff = y2 - y1

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

print(x3, y3, x4, y4)

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()


def main():
    x1, y1, x2, y2 = map(int, input().split())
    vec = (x2 - x1, y2 - y1)
    x3, y3 = x2 - vec[1], y2 + vec[0]
    x4, y4 = x3 - vec[0], y3 - vec[1]
    print("{} {} {} {}".format(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(x3,y3,x4,y4)

Solution (Python):
import sys

input = sys.stdin.readline


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

    delta_x = x2 - x1
    delta_y = y2 - y1
    x3, y3 = x2 - delta_y, y2 + delta_x
    x4, y4 = x3 - delta_x, y3 - delta_y

    print(x3, y3, x4, y4)


if __name__ == "__main__":
    main()

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

Solution (Python):

import sys


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



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    x = [int()] * (2)  
    y = [int()] * (2)  
    for i in range(2):
        x[i] = int(next(tokens))
        y[i] = int(next(tokens))
    solve(x, y)


if __name__ == "__main__":
    main()

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

Solution (Python):
import math
def li():
    return list(map(int, input().split()))
def mi():
    return map(int, input().split())
def ii():
    return int(input())

x1, y1, x2, y2 = mi()

l = 0

if (x2 - x1) == 0:
    l = abs(y2 - y1)
    if y2 > y1:
        x3 = x1 - l
    else:
        x3 = x1 + l
    y3 = y2
    x4 = x3
    y4 = y1

elif (y2 - y1) == 0:
    l = abs(x2 - x1)
    x3 = x2
    if x2 > x1:
        y3 = y2 + l
    else:
        y3 = y2 - l
    x4 = x1
    y4 = y3

else:
    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 + y1 - y2
y3 = y2 + x2 - x1
x4 = x3 + x1 - x2
y4 = y3 + y1 - y2

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 = list(map(int,input().split()))

X3 = X2 + -1*(Y2-Y1)
Y3 = Y2 + (X2-X1)
X4 = X3 + -1*(Y3-Y2)
Y4 = Y3 + (X3-X2)
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):
a, b, c, d = map(int, input().split())
print('{} {} {} {}'.format(c-(d-b), d+(c-a), a-(d-b), b+(c-a)))

Solution (Python):

import math
x1, y1, x2, y2 = map(int, input().split())
x2 -= x1
y2 -= y1
if x2 != 0:
    theta = math.atan2(y2,x2)
else:
    if y2 > 0:
        theta = math.pi / 2
    else:
        theta = 3 * math.pi / 2
if y2 == 0:
    if x2 < 0:
        theta = math.pi
    else:
        theta = 0

if theta < 0:
    theta += 2 * math.pi


l = math.sqrt(x2**2 + y2**2)

x3 = math.cos(theta+math.radians(45))*l*math.sqrt(2)+x1
y3 = math.sin(theta+math.radians(45))*l*math.sqrt(2)+y1

x4 = math.cos(theta+math.radians(90))*l+x1
y4 = math.sin(theta+math.radians(90))*l+y1
print(round(x3), round(y3), round(x4), round(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):
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 = list(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))

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

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

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

print(x3, y3, x4, y4)

Solution (Python):
x1,y1,x2,y2=map(int,input().split())
v = (x2-x1, y2-y1)
v23 = (-v[1], v[0])
v34 = (-v23[1], v23[0])
print(x2+v23[0], y2+v23[1], x2+v23[0]+v34[0], y2+v23[1]+v34[1])

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())
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())
print(x2-y2+y1, y2+x2-x1, x1-y2+y1, y1+x2-x1)

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

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

Solution (Python):
def resolve():
	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(x3, y3, x4, y4)
resolve()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy, copy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

x1, y1, x2, y2 = MAP()

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):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy, copy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

x1, y1, x2, y2 = MAP()

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())
xdis=x2-x1
ydis=y2-y1
x3=x2-ydis
y3=y2+xdis
x4=x1-ydis
y4=y1+xdis
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())
dx, dy = x2-x1, y2-y1
print(x2-dy, y2+dx, x1-dy, y1+dx)

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

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

x3 = x2 - dy
y3 = y2 - dx
x4 = x1 - dy
y4 = y1 - dx

print(x3,y3,x4,y4)

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

dy = (y2-y1)





x3 = x2 - dy
y3 = y2 - dx
x4 = x1 - dy
y4 = y1 - dx

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

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 = x1 - y2 + y1
y4 = y1 + x2 - x1
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
x4 = x1 - dy
y3 = y2 + dx
y4 = y1 + dx

print(x3,y3,x4,y4)

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

Solution (Python):
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('{} {} {} {}'.format(x3,y3,x4,y4))

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

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

Solution (Python):
x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1
if (dx < 0 and dy >= 0) or (dx >= 0 and dy < 0):
  x3, y3 = x2 - dy, y2 + dx
  x4, y4 = x1 - dy, y1 + dx
else:
  x3, y3 = x2 - dy, y2 + dx
  x4, y4 = x1 - dy, y1 + dx
  
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):
x1,y1, x2,y2 = map(int,input().split())


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

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

print(x3,y3,x4,y4)

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

def dot0(x, y, v):
    return (x - v[1], y + v[0])
    
vector = (x2 - x1, y2 - y1)
x3, y3 = dot0(x2, y2, vector)
x4, y4 = dot0(x1, y1, vector)

print(x3, y3, x4, y4)

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

Solution (Python):
def main():
    x1, y1, x2, y2 = map(int, input().split())
    vec = [x2-x1, y2-y1]
    x3, y3 = x2-vec[1], y2+vec[0]
    x4, y4 = x3-vec[0], y3-vec[1] 
    print(x3, y3, x4, y4)

if __name__ == "__main__":
    main()

Solution (Python):

import math


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




a=x2-x1
b=y2-y1

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

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





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

    v12 = (x2-x1, y2-y1)
    v23 = (-v12[1], v12[0])
    v34 = (-v23[1], v23[0])
    v41 = (-v34[1], v34[0])

    x3, y3 = x2+v23[0], y2+v23[1]
    x4, y4 = x3+v34[0], y3+v34[1]

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


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())
print(x2 - (y2 - y1), y2 + (x2 - x1), x1 - (y2 - y1), y1 + (x2 - x1))

Solution (Python):
from cmath import exp
from math import pi
x1, y1, x2, y2 = map(int, input().split())
v = x2 - x1 + (y2-y1)*1j
v_ = v*exp(pi/2*1j)

x3 = round(x2+v_.real)
y3 = round(y2+v_.imag)

x4 = round(x1+v_.real)
y4 = round(y1+v_.imag)

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






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def Yes(): print("Yes"); return
def No(): print("No"); return


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def Base_10_to_n(X, n):
  if (int(X/n)):
    return Base_10_to_n(int(X/n), n)+[X%n]
  return [X%n]






x1,y1,x2,y2 = inputIL()

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

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

vector = [x2 - x1, y2 - y1]
vector_t = [y1 - y2,x2 - x1]
x3 = x2 + vector_t[0]
y3 = y2 + vector_t[1]
x4 = x3 - vector[0]
y4 = y3 - vector[1]

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

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

vec_x = -(y_2 - y_1)
vec_y = x_2 - x_1

x_3, y_3 = x_2 + vec_x, y_2 + vec_y
x_4, y_4 = x_1 + vec_x, y_1 + vec_y

print(x_3, y_3, x_4, y_4)

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

x, y = x2-x1, y2-y1

if x>0 and y>=0:
    x4, y4 = -y, x
elif x<=0 and y>=0:
    x4, y4 = -y, x
elif x<=0 and y<=0:
    x4, y4 = -y, x
elif x>=0 and y<=0:
    x4, y4 = -y, x
x3, y3 = x+x4, y+y4

print(x3+x1, y3+y1, x4+x1, y4+y1)

Solution (Python):
x1, y1, x2, y2 = map(int, input().split())
vector = (x2-x1, y2-y1)
ten3 = (x2 - vector[1], y2 + vector[0])
ten4 = (x1-vector[1], y1 + vector[0])
ans = []
ans.append(ten3[0])
ans.append(ten3[1])
ans.append(ten4[0])
ans.append(ten4[1])
print(*ans)

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):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18


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

Solution (Python):


import sys
import itertools

def main():
    x_1, y_1, x_2, y_2 = map(int, sys.stdin.readline().split())
    x_3 = x_2 - (y_2-y_1)
    y_3 = y_2 + (x_2 - x_1)
    x_4 = x_3 - (x_2-x_1) 
    y_4 = y_3 - (y_2-y_1)
    
    print(x_3, y_3, x_4, y_4)
    
if __name__ == "__main__":
    main()

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

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):
x,y,X,Y=map(int,input().split())
keyx=X-x
keyy=Y-y
xx=X-keyy
XX=xx-keyx
yy=Y+keyx
YY=yy-keyy
print(xx,yy,XX,YY)

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

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

dx = x2 -x1
dy = y2 -y1

x3 = -dy + x2
y3 = dx + y2

dx = x3 -x2
dy = y3 -y2

x4 = -dy + x3
y4 = dx + y3

print(x3, y3, x4, y4)

Solution (Python):
x1,y1,x2,y2 = map(int,input().split())
 
side_x=x2-x1
side_y=y2-y1
 
pattern = [[side_x,side_y],[-side_y,side_x],[-side_x,-side_y],[side_y,side_x]]*2
 
i = pattern.index([side_x,side_y])
x3,y3 = x2+pattern[i+1][0],y2+pattern[i+1][1]
x4,y4 = x3+pattern[i+2][0],y3+pattern[i+2][1]
print(x3,y3,x4,y4)

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

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

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

print(x3, y3, x4, y4)

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

Solution (Python):
inf = 10 ** 15
mod = 10 ** 9 + 7
x1, y1, x2, y2 = map(int, input().split())
x3, y3 = x2 - (y2-y1), y2 - (x1-x2)
x4, y4 = x3 - (y3-y2), y3 - (x2-x3)
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())
if x1 == x2:
    print(x2 - (y2 - y1), y2, x2 - (y2 - y1), y1)
else:
    print(x2 - (y2 - y1), y2 + (x2 - x1), x2 - (y2 - y1) - (x2 - x1), y2 + (x2 - x1) - (y2 - y1))

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

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

print(x3, y3, x4, y4)

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

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

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

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())
X=x2-x1
Y=y2-y1
print(-(Y-x2),X+y2,-(Y-x1),X+y1)

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

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(' '.join(map(str, [x3, y3, x4, y4])))

Solution (Python):


import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))

from fractions import gcd
def resolve():
    x1,y1,x2,y2=pin()
    a=y2-y1
    b=x2-x1
    x3=x2-a;y3=y2+b
    x4=x1-a;y4=y1+b
    print(x3,y3,x4,y4)
    
        

resolve()

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

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


resolve()

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

Solution (Python):
import fileinput

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

xx = x2 - x1
yy = y2 - y1

x3 = x2 - yy
y3 = y2 + xx

x4 = x1 - yy
y4 = y1 + xx

print(x3, y3, x4, y4)

Solution (Python):
X1, Y1, X2, Y2 = map(int, input().split())
X3, Y3 = X2-(Y2-Y1), Y2+(X2-X1)
X4, Y4 = X3-(Y3-Y2), Y3+(X3-X2)
print(X3, Y3, X4, Y4)

Solution (Python):

import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

x1, y1, x2, y2 = lr()
P2 = np.array([x2, y2])  
A = np.array([[0, -1], [1, 0]])
vec = np.array([x2-x1, y2-y1])
vec2 = np.dot(A, vec)
vec3 = np.dot(A, vec2)
P3 = P2 + vec2
P4 = P3 + vec3
answer = np.concatenate([P3, P4])
print(*answer)

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

x = x2 - x1
y = y2 - y1

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

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

w = x2 - x1
h = y2 - y1

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

print(x3, y3, x4, y4)

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    x1, y1, x2, y2 = mi()
    vec = (x2 - x1, y2 - y1)
    vec2 = (- vec[1], vec[0])
    vec3 = (- vec2[1], vec2[0])
    x3, y3 = x2 + vec2[0], y2 + vec2[1]
    x4, y4 = x3 + vec3[0], y3 + vec3[1]
    print("{} {} {} {}".format(x3, y3, x4, y4))


if __name__ == "__main__":
    main()

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())
a=x1-x2
b=y1-y2
print(x2+b,y2-a,x1+b,y1-a)

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 = [int(i) for i in input().split()]

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

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

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




def up(x_pre, y_pre, x_diff, y_diff):
  return x_pre-x_diff, y_pre+y_diff
def left(x_pre, y_pre, x_diff, y_diff):
  return x_pre-x_diff, y_pre-y_diff
def down(x_pre, y_pre, x_diff, y_diff):
  return x_pre+x_diff, y_pre-y_diff
def right(x_pre, y_pre, x_diff, y_diff):
  return x_pre+x_diff, y_pre+y_diff

x_diff_ = x2 - x1
y_diff_ = y2 - y1

rotate = []
if y_diff_ >= 0:
  if x_diff_ >= 0:
    
    rotate = [up, left]
  else:
    
    rotate = [left, down]
else:
  if x_diff_ >= 0:
    
    rotate = [right, up]
  else:
    
    rotate = [down, right]
  
x3, y3 = rotate[0](x2, y2, abs(y2-y1), abs(x2-x1))

x4, y4 = rotate[1](x3, y3, abs(y3-y2), abs(x3-x2))

print(x3, y3, x4, y4)

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

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

x3,y3,x4,y4=0,0,0,0

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

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

print(x3,y3,x4,y4)