Problem:


Score : 200 points

Problem Statement

There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order.
(Assume that the positive x-axis points right, and the positive y-axis points up.)

Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).

Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Constraints

|x_1|,|y_1|,|x_2|,|y_2| \leq 100

(x_1,y_1) ≠ (x_2,y_2)

All values in input are integers.

Input

Input is given from Standard Input in the following format:

x_1 y_1 x_2 y_2

Output

Print x_3,y_3,x_4 and y_4 as integers, in this order.

Sample Input 1

0 0 0 1

Sample Output 1

-1 1 -1 0

(0,0),(0,1),(-1,1),(-1,0) is the four vertices of a square in counter-clockwise order.
Note that (x_3,y_3)=(1,1),(x_4,y_4)=(1,0) is not accepted, as the vertices are in clockwise order.

Sample Input 2

2 3 6 6

Sample Output 2

3 10 -1 7

Sample Input 3

31 -41 -59 26

Sample Output 3

-126 -64 -36 -131



Sample input:
0 0 0 1


Sample output:
-1 1 -1 0

Submission status: Accepted

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

a = x2 - x1
b = y2 - y1

x3 = x2 + (-b)
y3 = y2 + a

a = x3 - x2
b = y3 - y2

x4 = x3 + (-b)
y4 = y3 + a

print(x3, y3, x4, y4)

Submission status: Accepted

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    x=a[2]-a[0]
    y=a[3]-a[1]

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

Submission status: Accepted

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

b = x2 - x1
a = y2 - y1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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)
ans = (x3, y3, x4, y4)
print(*ans, sep=' ')

Submission status: Accepted

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

dx = x2 - x1
dy = y2 - y1

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

Submission status: Accepted

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

Submission status: Accepted

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

dx = c-a
dy = d-b
l = []
e=c-dy
f=d+dx


g = e-dx
h = f-dy

print(e,end=" ")
print(f,end=" ")
print(g,end=" ")
print(h,end=" ")

Submission status: Accepted

Solution code:
def actual(x1, y1, x2, y2):
    a = x2 - x1
    b = y2 - y1

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

    # return f'{x3} {y3} {x4} {y4}'
    return '{} {} {} {}'.format(x3, y3, x4, y4)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(map(int, input().split()))
x = s[2]-s[0]
y = s[3]-s[1]
l = [s[2]-y, s[3]+x, s[0]-y, s[1]+x]
for i in l:
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

dx = x2-x1
dy = y2-y1

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[27]:


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


# In[28]:


import numpy as np


# In[29]:


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


# In[ ]:

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B - Ruined Square

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

dx = x2-x1
dy = y2-y1

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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
# x = Cの場合
if (x2 - x1) == 0:
    l = abs(y2 - y1)
    if y2 > y1:
        x3 = x1 - l
    else:
        x3 = x1 + l
    y3 = y2
    x4 = x3
    y4 = y1
# y = Cの場合
elif (y2 - y1) == 0:
    l = abs(x2 - x1)
    x3 = x2
    if x2 > x1:
        y3 = y2 + l
    else:
        y3 = y2 - l
    x4 = x1
    y4 = y3
# y = ax + bの場合
else:
    x3 = x2 - (y2 - y1)
    y3 = y2 + (x2 - x1)
    x4 = x1 - (y2 - y1)
    y4 = y1 + (x2 - x1)

print(x3, y3, x4, y4)

Submission status: Accepted

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
X1,Y1,X2,Y2 = 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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:

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
#theta = 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))

Submission status: Accepted

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

Submission status: Accepted

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

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 = x1 - b, y1 + a

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# 図開して、直角三角形を各四角形の隅に置いたと仮定して点3は点2を基準に,点4は点1を基準に愚直に算出
y3 = y2 + x2 - x1
x3 = x2 + y1 - y2

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import numpy as np
import math
#T= str(input())
#K = int(input())
x1,y1,x2,y2= map(int,input().split())
#A = list(map(int,input().split()))
#B = list(map(int,input().split()))
#S= str(input())

a=x2-x1
b=y2-y1

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

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:
# coding: utf-8

# https://atcoder.jp/contests/abc108


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()
# print(main())

Submission status: Accepted

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

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

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

#############
# Functions #
#############

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

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

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

######Combination######
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

######Factorization######
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

#####MakeDivisors######
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

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

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

#####ChangeBase#####
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]


#############
# Main Code #
#############

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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[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)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

a = x2 - x1
b = y2 - y1

x3 = x2 - b
y3 = y2 + a

x4 = x3 - a
y4 = y3 - b

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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