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())
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())
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())
diffx,diffy = x2-x1,y2-y1
x3,y3 = x2-diffy, y2+diffx
x4,y4 = x3-diffx, y3-diffy
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(" ".join([str(c-y),str(d+x),str(a-y),str(b+x)]))

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int,input().split())
x = x2
y = y2
dx = x2 - x1
dy = y2 - y1
for i in range(2):
    dy, dx = dx, dy
    dx = -1 * dx
    x += dx
    y += dy
    print(x,y,end=" ")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x_length = x_2 - x_1
y_length = y_2 - y_1

x_3 = x_2 - y_length
y_3 = y_2 + x_length
x_4 = x_1 - y_length
y_4 = y_1 + x_length

print(x_3, y_3, x_4, y_4)

Submission status: Accepted

Solution code:
a,b,c,d=[int(s) for s in input().split()]
x=c-a
y=d-b
A=c-y
B=d+x
C=A-x
D=B-y
print(*[A,B,C,D])

Submission status: Accepted

Solution code:
x_1, y_1, x_2, y_2 = map(int, input().split())
x = x_2 -x_1
y = y_2 - y_1
print(x_2-y, y_2+x, x_1-y, y_1+x)

Submission status: Accepted

Solution code:
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 = x1 - delta_y, y1 + delta_x

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    x1, y1, x2, y2 = list(map(int, input().split()))
    dis = [x2-x1, y2-y1]
    print(x2-dis[1], y2+dis[0] , x2-dis[1]-dis[0], y2+dis[0]-dis[1])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    ax, ay, bx, by = list(map(int, input().rstrip('\n').split()))
    cx = cy = dx = dy = 0

    cx = bx + (ay - by)
    cy = by - (ax - bx)

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

    print(cx, cy, dx, dy)


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

Submission status: Accepted

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

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

if x1 <= x2 and y1 <= y2:
    x3 = -dy + x2
    y3 = dx + y2
    x4 = -dy + x1
    y4 = dx + y1
elif x2 <= x1 and y1 <= y2:
    x3 = -dy + x2
    y3 = -dx + y2
    x4 = -dy + x1
    y4 = -dx + y1
elif x1 <= x2 and y2 <= y1:
    x3 = dy + x2
    y3 = dx + y2
    x4 = dy + x1
    y4 = dx + y1
elif x2 <= x1 and y2 <= y1:
    x3 = dy + x2
    y3 = -dx + y2
    x4 = dy + x1
    y4 = -dx + y1

print(x3, y3, x4, y4)

Submission status: Accepted

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

if x1 <= x2 and y1 <= y2:
    dx, dy = abs(x2 - x1), abs(y2 - y1)
    x3 = -dy + x2
    y3 = dx + y2
    x4 = -dy + x1
    y4 = dx + y1
elif x2 <= x1 and y1 <= y2:
    dx, dy = abs(x1 - x2), abs(y2 - y1)
    x3 = -dy + x2
    y3 = -dx + y2
    x4 = -dy + x1
    y4 = -dx + y1
elif x1 <= x2 and y2 <= y1:
    dx, dy = abs(x2 - x1), abs(y2 - y1)
    x3 = dy + x2
    y3 = dx + y2
    x4 = dy + x1
    y4 = dx + y1
elif x2 <= x1 and y2 <= y1:
    dx, dy = abs(x1 - x2), abs(y2 - y1)
    x3 = dy + x2
    y3 = -dx + y2
    x4 = dy + x1
    y4 = -dx + y1

print(x3, y3, x4, y4)

Submission status: Accepted

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



def main():

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




if __name__ == "__main__":
    main()

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
vec1=[x1-x2,y1-y2]  #3->4
vec2=[y1-y2,x2-x1]  #2->3

print(x2+vec2[0],y2+vec2[1],\
      x2+vec2[0]+vec1[0],y2+vec2[1]+vec1[1])

Submission status: Accepted

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

vx, vy = x2 - x1, y2 - y1
vx, vy = -vy, vx

print(x2 + vx, y2 + vy, x1 + vx, y1 + vy)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
ans=[x2-y2+y1,y2+x2-x1,x1-y2+y1,y1+x2-x1]
print(*ans,sep=' ') #区切り文字指定

Submission status: Accepted

Solution code:
a, b, c, d = map(int, input().split(' '))
vec = (c-a, d-b)
result = [c-vec[1], d + vec[0], a-vec[1], b + vec[0]]
print(' '.join(map(str, result)))

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

tmp = x2 - x1
tmp2 = y2 - y1
print(x2 - tmp2, y2 + tmp, x1 - tmp2, y1 + tmp)

Submission status: Accepted

Solution code:
from math import cos, sin, pi

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

x3 = cos(-0.5*pi)*(x1-x2)-sin(-0.5*pi)*(y1-y2)+x2
y3 = sin(-0.5*pi)*(x1-x2)+cos(-0.5*pi)*(y1-y2)+y2

x4 = cos(0.5*pi)*(x2-x1)-sin(0.5*pi)*(y2-y1)+x1
y4 = sin(0.5*pi)*(x2-x1)+cos(0.5*pi)*(y2-y1)+y1
print(round(x3), round(y3), round(x4),round(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())
x  =x2-x1
y =y2-y1
print(x2-y,y2+x,x1-y,y1+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

a=np.array([x1,y1])
b=np.array([x2,y2])

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

c = b + np.dot(T,b-a)
d = c + np.dot(T,c-b)
print(*c, end=' ')
print(*d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
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(str(x3)+' '+str(y3)+' '+str(x4)+' '+str(y4))

Submission status: Accepted

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

print(str(x2-dy) + ' ' + str(y2+dx) + ' ' + str(x1-dy) +' ' + str(y1 + dx))

Submission status: Accepted

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

Submission status: Accepted

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

x_1to2 = x_2 - x_1
y_1to2 = y_2 - y_1

rot = complex(0, 1)
vec_1to4 = complex(x_1to2, y_1to2) * rot
x_1to4 = vec_1to4.real
y_1to4 = vec_1to4.imag

x_4 = x_1to4 + x_1
y_4 = y_1to4 + y_1

x_3 = x_4 + x_1to2
y_3 = y_4 + y_1to2

print(str(int(x_3)), str(int(y_3)), str(int(x_4)), str(int(y_4)))

Submission status: Accepted

Solution code:
a,b,c,d = [int(i) for i in input().split()]

x = -(d-b)
y = c-a

print(c+x,d+y,a+x,b+y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    x1, y1, x2, y2 = map(int, input().split())
    x, y = x1 - x2, y1 - y2
    print(x2 + y, y2 - x, x1 + y, y1 - x)
    # print(" ".join([x1 - x, y1, x2, y2]))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

x = c-a
y = d-b

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

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

x1, y1, x2, y2 = nm()

lx = x2-x1
ly = y2-y1

print(x2-ly)
print(y2+lx)
print(x1-ly)
print(y1+lx)

Submission status: Accepted

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

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

x = x2 - x1
y = y2 - y1

x3 = x2 - y
y3 = y2 + x

x4 = x3 - x
y4 = y3 - y

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

x1, y1, x2, y2=map(int, input().split())
xy3=np.array([x2, y2])+np.dot(r90, np.array([x2-x1, y2-y1]))
xy4=np.array([x1, y1])+np.dot(r270, np.array([x1-x2, y1-y2]))

print(' '.join(map(str, xy3.tolist())), end=' ')
print(' '.join(map(str, xy4.tolist())))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

x=a[2]-a[0]
y=a[3]-a[1]
x3=a[2]-y
y3=a[3]+x
print(x3,y3,end=' ')
x=x3-a[2]
y=y3-a[3]
x4=x3-y
y4=y3+x
print(x4,y4)

Submission status: Accepted

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

Submission status: Accepted

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

a = s[2] - s[3] + s[1]
b = s[3] + s[2] - s[0]
c = s[0] - s[3] + s[1]
d = s[1] + s[2] - s[0]

print ("{} {} {} {}".format(a,b,c,d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

xl = x1 - x2
yl = y2 - y1

print(x2 - yl, y2 - xl, x1 - yl, y1 - xl)

Submission status: Accepted

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

Submission status: Accepted

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

a,b = (n[2] - n[0]), (n[3] - n[1])

o1,o2 = (n[2] - b), (n[3] + a)
o3,o4 = (o1 - a),(o2 - b)

print(" ".join(list(map(str, [o1,o2,o3,o4]))))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    x1,y1,x2,y2=map(int,input().split())
    x,y=x2-x1,y2-y1
    x3,y3=x2-y,y2+x
    x4,y4=x3-x,y3-y
    print(x3,y3,x4,y4)
resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import os, sys, re, math

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

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

x1, y1, x2, y2 = na()

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
d=(x2-x1,y2-y1)
d90=(-d[1],d[0])
d180=(-d[0],-d[1])
x3=x2+d90[0]
y3=y2+d90[1]
print(x3,y3,x3+d180[0],y3+d180[1])

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = list(map(int, input().split()))
vec = [x2 - x1, y2 - y1]
vec = [-vec[1], vec[0]]
x3 = x2 + vec[0]
y3 = y2 + vec[1]
vec = [-vec[1], vec[0]]
x4 = x3 + vec[0]
y4 = y3 + vec[1]
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 = [int(x) for x in input().split()]
x = x2-x1
y = y2-y1
print(x2-y,y2+x,x1-y,y1+x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np


x1, y1, x2, y2 = map(int, input().split())
a = np.array([x1, y1])
b = np.array([x2, y2])
R = np.array([[0, -1], [1, 0]])
ab = b - a
ad = np.dot(R, ab)
d = ad + a
dc = np.dot(R, a - d)
c = dc + d

print('{} {} {} {}'.format(c[0], c[1], d[0], d[1]))

Submission status: Accepted

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

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

Submission status: Accepted

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

a = x2 - x1
b = y2 - y1


x3 = x2 - b
y3 = y2 + a

x4 = x1 - b
y4 = y1 + a

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
# ABC108b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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:
#!/usr/bin/env python3
x1, y1, x2, y2 = map(int, input().split())
def f(x1,y1,x2,y2):
    x3=x2+y1-y2
    y3=y2-(x1-x2)
    return x3,y3
x3,y3=f(x1,y1,x2,y2)
x4,y4=f(x2,y2,x3,y3)

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from math import sin, cos, radians

def rotate_point(point, angle, center_point=(0, 0)):
    """Rotates a point around center_point(origin by default)
    Angle is in degrees.
    Rotation is counter-clockwise
    """
    angle_rad = radians(angle % 360)
    # Shift the point so that center_point becomes the origin
    new_point = (point[0] - center_point[0], point[1] - center_point[1])
    new_point = (new_point[0] * cos(angle_rad) - new_point[1] * sin(angle_rad),
                 new_point[0] * sin(angle_rad) + new_point[1] * cos(angle_rad))
    # Reverse the shifting we have done
    new_point = (round(new_point[0] + center_point[0]), round(new_point[1] + center_point[1]))
    return new_point

def main():
    X1,Y1,X2,Y2  = map(int, input().split())
    Cord1 = (X1,Y1)
    Cord2 = (X2,Y2)
    Cord3 = rotate_point(Cord1,-90, Cord2)
    Cord4 = rotate_point(Cord2,90, Cord1)
    print("{} {} {} {}".format(Cord3[0],Cord3[1],Cord4[0],Cord4[1]))
                

    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
x_1,y_1,x_2,y_2=map(int,input().split())
a=x_2-x_1
b=y_2-y_1
x_4=x_1-b
y_4=y_1+a
x_3=x_4+a
y_3=y_4+b
print(x_3,y_3,x_4,y_4)

Submission status: Accepted

Solution code:
L = list(map(int, input().split()))
p1 = (L[0], L[1])
p2 = (L[2], L[3])
vec = (L[2]-L[0], L[3]-L[1])


def rotate90(v):
    return -v[1], v[0]


vec = rotate90(vec)
p3 = (p2[0]+vec[0], p2[1]+vec[1])
vec = rotate90(vec)
p4 = (p3[0]+vec[0], p3[1]+vec[1])

print("{} {} {} {}".format(p3[0], p3[1], p4[0], p4[1]))

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:
xy=list(map(int,input().split()))
len=[xy[2]-xy[0],xy[3]-xy[1]]
print(xy[2]-len[1],xy[3]+len[0],xy[0]-len[1],xy[1]+len[0])

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

Submission status: Accepted

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

Submission status: Accepted

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

x3=x2+dy
y3=y2-dx

x4=x1+dy
y4=y1-dx
ans=[x3,y3,x4,y4]
print(" ".join(list(map(str,ans))))

Submission status: Accepted

Solution code:
import math

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

#line = math.sqrt(pow(x2-x1,2)+pow(y2-y1,2))

buf1=x2-x1
buf2=y2-y1

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

Submission status: Accepted

Solution code:
import math

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

x_vec = x2 - x1
y_vex = y2 - y1

vec = [x_vec, y_vex]
p2 = [x2, y2]

p3 = [p2[0] + int(math.cos(math.pi / 2)) * vec[0] -int(math.sin(math.pi / 2)) * vec[1], 
         p2[1] + int(math.sin(math.pi / 2))* vec[0] + int(math.cos(math.pi / 2)) * vec[1]]
p4 = [p3[0] +int(math.cos(math.pi)) * vec[0] -int(math.sin(math.pi)) * vec[1], 
         p3[1] + int(math.sin(math.pi))* vec[0] + int(math.cos(math.pi)) * vec[1]]
print(p3[0], p3[1], p4[0], p4[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(
  map(
    int, input().split())
  )
x1=s[0]
y1=s[1]
x2=s[2]
y2=s[3]
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:
XY = list(map(int, input().split()))#x1,y1,x2,y2

a,b = XY[0] - XY[2], XY[1] - XY[3]
x3, y3 = b + XY[2], -a + XY[3]
c,d = XY[2] - x3, XY[3] - y3
x4, y4 = d + x3, -c + y3

print(x3, y3, x4, y4)

Submission status: Accepted

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

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

P3 = [x2+rotv[0],y2+rotv[1]]
P4 = [P3[0] - v[0], P3[1] - v[1]]

print(*(P3 + P4))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""#################################################################
【ABC108】
B_Ruined_Square
#################################################################"""

#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

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

Submission status: Accepted

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

k1=x2-x1
k2=y2-y1

print(x2-k2,y2+k1,x2-k2-k1,y2+k1-k2)

Submission status: Accepted

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

k1=x2-x1
k2=y2-y1

x3=x2-k2
y3=y2+k1

x4=x3-k1
y4=y3-k2

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

a = np.reshape(np.array(list(map(int, input().split()))), (2, 2))


def rotation(x, t, deg = False):
    if deg == True:
        t = np.deg2rad(t)
    a = np.array([[np.cos(t), -np.sin(t)],
                  [np.sin(t),  np.cos(t)]])
    ax = np.dot(a, x)
    return ax


b = a[1] + rotation(a[1] - a[0], 90, deg=True)
c = b + rotation(b - a[1], 90, deg=True)
ans_list = np.hstack((b, c)).tolist()
ans = [round(i) for i in ans_list]

print(' '.join(map(str, ans)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

r = (x12**2+y12**2)**(1/2)
θ = math.asin(abs(y12)/r)
if 0 >= x12 and 0 <= y12:
    θ = math.pi - θ
elif 0 >= x12 and 0 > y12:
    θ += math.pi
elif 0 < x12 and y12 < 0:
    θ = 2*math.pi - θ
x3 = round((2**(1/2)*r)*math.cos(θ + (math.pi/4)) + x1)
y3 = round((2**(1/2)*r)*math.sin(θ + (math.pi/4)) + y1)
x4 = round(r*math.cos(θ + (math.pi/2)) + x1)
y4 = round(r*math.sin(θ + (math.pi/2)) + y1)
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
x1, y1, x2, y2 = map(int, input().split())

# 点1から点2への差分を計算
dx = x2 - x1
dy = y2 - y1

# 点3, 点4の座標を計算
x3 = x2 - dy
y3 = y2 + dx
x4 = x3 - dx
y4 = y3 - dy

# 出力
print(str(x3) + " "+str(y3)+" "+str(x4)+" " + str(y4))

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

x1, y1, x2, y2 = na()
vx, vy = x2 - x1, y2 - y1
e1 = [-vy, vx]
p3 = [x2 + e1[0], y2 + e1[1]]
p4 = [p3[0] - vx, p3[1] - vy]
print(*[p3[0], p3[1], p4[0], p4[1]])

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(str(x3)+" "+str(y3)+" "+str(x4)+" "+str(y4))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

xlen=x2-x1
ylen=y2-y1

print(x2-ylen,end=" ")
print(y2+xlen,end=" ")
print(x1-ylen,end=" ")
print(y1+xlen)

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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