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

Submission status: Accepted

Solution code:
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

x1, y1, x2, y2 = inintm()

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

Submission status: Accepted

Solution code:
import math
x1, y1, x2, y2 = [int(a) for a in 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
x3 = c- y
y3 = d+ x
x4 = a- y
y4 = b+ x
print(x3,y3,x4,y4)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
X1,Y1,X2,Y2 = (int(T) for T in input().split())
MoveV  = np.array([X2-X1,Y2-Y1]).T
Rotate = np.array([[0,-1],[1,0]])

MoveV = np.dot(Rotate,MoveV)
X3,Y3 = X2+MoveV[0],Y2+MoveV[1]

MoveV = np.dot(Rotate,MoveV)
X4,Y4 = X3+MoveV[0],Y3+MoveV[1]

print('{} {} {} {}'.format(X3,Y3,X4,Y4))

Submission status: Accepted

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

x = x1 - x2
y = y2 - y1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().split()

a = int(s[0])
b = int(s[1])
c = int(s[2])
d = int(s[3])

x = c - a
y = d - b

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

Submission status: Accepted

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

x = x1 - x2
y = y1 - y2

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

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

dx12 = x2 - x1
dy12 = y2 - y1
dx23 = -dy12
dy23 = dx12
dx34 = -dy23
dy34 = dx23

x3 = x2 + dx23
y3 = y2 + dy23
x4 = x3 + dx34
y4 = y3 + dy34

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

Submission status: Accepted

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

diff = x2-x1,y2-y1

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

print(*(x3,y3,x4,y4))

Submission status: Accepted

Solution code:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

a,b,c,d = MI()
e,f = c-a,d-b
print(c-f,d+e,a-f,b+e)

Submission status: Accepted

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

x = x2 - x1
y = y2 - y1
dx = y
dy = x

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

height = y2 - y1
width = x2 - x1

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

x = x2 - x1
y = y2 - y1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = list(map(int,input().split()))
vectorX = x2 - x1
vectorY = y2 - y1
x3 = x2 - vectorY
y3 = y2 + vectorX
x4 = x3 - vectorX
y4 = y3 - vectorY
answer = str(x3) + " " + str(y3) + " " + str(x4) + " " + str(y4)
print(answer)

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

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

grad_x = x2-x1
grad_y = y2-y1

x3, y3 = x2-grad_y, y2+grad_x

x4, y4 = x3-grad_x, y3-grad_y

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
MM = input().split()
x1 = int(MM[0])
y1 = int(MM[1])
x2 = int(MM[2])
y2 = int(MM[3])
a = x2 - x1
b = y2 - y1
x3 = x2 - b
y3 = y2 +a
x4 = x1 -b
y4 = y1 + a
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
muki = x2 - x1
muki2 = y2 - y1
x3, y3, x4, y4 = 0, 0, 0, 0
ax = abs(muki)
ay = abs(muki2)
if muki > 0 and muki2 > 0:
    x3 = x2 - ay
    y3 = y2 + ax
    x4 = x3 - ax
    y4 = y3 - ay
elif muki > 0:
    x3 = x2 + ay
    y3 = y2 + ax
    x4 = x3 - ay
    y4 = y3 + ax
elif muki2 > 0:
    x3 = x2 - ay
    y3 = y2 - ax
    x4 = x3 + ax
    y4 = y3 - ay
else:
    x3 = x2 + ay
    y3 = y2 - ax
    x4 = x3 + ax
    y4 = y3 + ay

print(x3, y3, x4, y4)

Submission status: Accepted

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

X = x2 - x1
Y = y2 - y1

ans = [x2 - Y, y2 + X, x1 - Y, y1 + X]

print(" ".join([str(i) for i in ans]))

Submission status: Accepted

Solution code:
# abc108_b.py
# https://atcoder.jp/contests/abc108/tasks/abc108_b

# B - Ruined Square /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 200点

# 問題文
# xy平面上に正方形があり、4 つの頂点の座標は反時計回りに順番に (x1,y1),(x2,y2),(x3,y3),(x4,y4) です。 
# なお、x 軸は右向きに、y軸は上向きに取ることにします。
# 高橋君は、これら 4つの座標のうち (x3,y3),(x4,y4)を忘れてしまいました。
# x1,x2,y1,y2が与えられるので、x3,y3,x4,y4 を復元してください。
# なお、これらの条件から、x3,y3,x4,y4は一意に存在し、整数となることが証明できます。

# 制約
#     |x1|,|y1|,|x2|,|y2|≤100
#     (x1,y1)≠ (x2,y2)
#     入力はすべて整数である

# 入力
# 入力は以下の形式で標準入力から与えられる。
# x1 y1 x2 y2

# 出力
# x3,y3,x4,y4をこの順に整数で出力せよ。

# 入力例 1
# 0 0 0 1

# 出力例 1
# -1 1 -1 0

# 4点 (0,0),(0,1),(−1,1),(−1,0) は、この順に正方形を反時計回りに見たときの 4 頂点をなします。 
# (x3,y3)=(1,1),(x4,y4)=(1,0)は、頂点が時計回りに並んでいるので適さないことに注意してください。

# 入力例 2
# 2 3 6 6

# 出力例 2
# 3 10 -1 7

# 入力例 3
# 31 -41 -59 26

# 出力例 3
# -126 -64 -36 -131


def calculation(lines):
    x1, y1, x2, y2 = list(map(int, lines[0].split()))
    # N = int(lines[0])
    v1, v2 = x2-x1, y2-y1
    x3, y3 = x2-v2, y2+v1
    x4, y4 = x3-v1, y3-v2
    return [str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4)]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['0 0 0 1']
        lines_export = ['-1 1 -1 0']
    if pattern == 2:
        lines_input = ['2 3 6 6']
        lines_export = ['3 10 -1 7']
    if pattern == 3:
        lines_input = ['31 -41 -59 26']
        lines_export = ['-126 -64 -36 -131']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

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

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline  #文字列では使わない
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(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

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

xDiff, yDiff = x1 - x2, y1 - y2

print(x2+yDiff, y2-xDiff, x1+yDiff, y1-xDiff)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

def resolve():
    x1, y1, x2, y2 = map(int, input().split())
    p1 = np.array([x1, y1])
    p2 = np.array([x2, y2])

    rot_matrix = np.array([[0, -1], [1, 0]])
    p3 = p2 + np.dot(rot_matrix, p2 - p1)
    p4 = p3 + np.dot(rot_matrix, p3 - p2)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
x=abs(c-a)
y=abs(d-b)
if a<c and b<=d:
    f=d+x
    e=c-y
    g=e-x
    h=f-y
elif a>=c and b<d:
    f=d-x
    e=c-y
    g=e+x
    h=f-y
elif a>c and b>=d:
    f=d-x
    e=c+y
    g=e+x
    h=f+y
else:
    f=d+x
    e=c+y
    g=e-x
    h=f+y
print(e,f,g,h)

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(f"{x3} {y3} {x4} {y4}")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    x1, y1, x2, y2 = LI()

    p2p3_x = y1 - y2
    p2p3_y = x2 - x1
    x3 = x2 + p2p3_x
    y3 = y2 + p2p3_y
    p3p4_x = x1 - x2
    p3p4_y = y1 - y2
    x4 = x3 + p3p4_x
    y4 = y3 + p3p4_y

    print(x3, y3, x4, y4)

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

a = x2 - x1
b = y2 - y1

x4 = x1 - b
y4 = y1 + a

x3 = x4 + a
y3 = y4 + b

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 = x1 - dy
y4 = y1 + dx

print(x3,y3,x4,y4)

Submission status: Accepted

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

x3 = x2-diffy
y3 = y2+diffx
x4 = x3-diffx
y4 = y3-diffy
print(x3,y3,x4,y4)

Submission status: Accepted

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

vec12_x=-(y2-y1)
vec12_y=x2-x1

x3=x2+vec12_x
y3=y2+vec12_y

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

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

a = x2 - x1
b = 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())
dx = x2-x1
dy = y2-y1
res = [x1-dy+dx, y1+dx+dy, x1-dy, y1+dx]
res_s = [str(r) for r in res]
ans = " ".join(res_s)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

if x1 >= x2 and y2 >= y1:
    x3 = x2 - abs(y2-y1)
    y3 = y2 - abs(x1-x2)
    x4 = x3 + abs(x1 - x2)
    y4 = y3 - abs(y2 - y1)
elif x1 <= x2 and y2 >= y1:
    x3 = x2 - abs(y2-y1)
    y3 = y2 + abs(x1-x2)
    x4 = x3 - abs(x1 - x2)
    y4 = y3 - abs(y2 - y1)
elif x1 >= x2 and y2 <= y1:
    x3 = x2 + abs(y2 - y1)
    y3 = y2 - abs(x1 - x2)
    x4 = x3 + abs(x1 - x2)
    y4 = y3 + abs(y2 - y1)
else:
    x3 = x2 + abs(y2 - y1)
    y3 = y2 + abs(x1 - x2)
    x4 = x3 - abs(x1 - x2)
    y4 = y3 + abs(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 = x2 - dy
y3 = y2 + dx
x4 = x1 - dy
y4 = y1 + dx
print(f"{x3} {y3} {x4} {y4}")

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
def main():
  x1,y1,x2,y2 = list(map(int,input().split()))
  xsub=x2-x1
  ysub=y2-y1
  print(x2-ysub,y2+xsub,x1-ysub,y1+xsub)
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
x = abs(a-c)
y = abs(b-d)
if b <= d:
    ax = c - y
    bx = a - y
else:
    ax = c + y
    bx = a + y
if a <= c:
    ay = d + x
    by = b + x
else:
    ay = d - x
    by = b - x
print(str(ax)+' '+str(ay)+' '+str(bx)+' '+str(by))

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

Submission status: Accepted

Solution code:
#30 **より二回かけた方が早い
import math
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 = 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())
dx = x2 - x1
dy = y2 - y1
nx = x2
ny = y2
l = []
for i in range(2) :
    dx, dy = -dy, dx
    nx += dx
    ny += dy
    l.append(nx)
    l.append(ny)
print(l[0], l[1], l[2], l[3])

Submission status: Accepted

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

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

x3 = x2 - y
y3 = y2 + x

x4 = x1 - y
y4 = y1 + x

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    def dist(x, y, dx, dy):
        return ((x - dx) ** 2 + (y - dy) ** 2) ** (1 / 2)

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

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

    return

resolve()

Submission status: Accepted

Solution code:
x = map(int, raw_input().split(' '))
a = tuple(x[:2])
b = tuple(x[2:])
vector = [-(b[1] - a[1]), (b[0] - a[0]) ]

c = [b[0] + vector[0],b[1] + vector[1] ]
d = [a[0] + vector[0],a[1] + vector[1] ]  

print c[0],c[1], d[0],d[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(x3, y3, x4, y4)

Submission status: Accepted

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

xd = x2 - x1
yd = y2 - y1

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a, b, c, d = map(int, input().split())
dx = c - a
dy = d - b
print(c - dy, d + dx, a - dy, b + dx)

Submission status: Accepted

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

if not (abs(x1) <= 100 and abs(y1) <= 100 and abs(x2) <= 100 and abs(y2) <= 100):
    sys.exit()

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

print(x2+vec[0],y2+vec[1],x1+vec[0],y1+vec[1])

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

x1, y1, x2, y2 = rm()
c1, c2 = x1+y1*1j, x2+y2*1j
c3, c4 = -1j*(c1-c2) + c2, 1j*(c2-c1) + c1
print(int(c3.real), int(c3.imag), int(c4.real), int(c4.imag))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d=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())

dx = x1 - x2 #-4
dy = y1 - y2 #-3

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

D = ((x1-x2)**2 + (y1-y2)**2)**(1/2)

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:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

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


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

xv_12, yv_12 = x2-x1, y2-y1
xv_23, yv_23 = yv_12*-1, xv_12
xv_34, yv_34 = yv_23*-1, xv_23

x3, y3 = x2+xv_23, y2+yv_23
x4, y4 = x3+xv_34, y3+yv_34

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

Submission status: Accepted

Solution code:
x,y,xx,yy = map(int,open(0).read().split())
print(xx-(yy-y), yy+(xx-x), x-(yy-y), y+(xx-x))

Submission status: Accepted

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

a = x2 - x1
b = y2 - y1

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

print(f'{x3} {y3} {x4} {y4}')

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

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 = [int(w) for w in input().split()]
b = x2 - x1
a = y2 - y1

x3 = x2-a
y3 = y2+b

x4 = x3-b
y4 = y3 - a

print(x3, y3, x4, y4)

Submission status: Accepted

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

delx12 = x2-x1
dely12 = y2-y1

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    x1, y1, x2, y2 = MI()
    x3 = x2 - y2 + y1
    y3 = y2 + x2 - x1
    x4 = x3 - x2 + x1
    y4 = y3 - y2 + y1
    print("{} {} {} {}".format(x3, y3, x4, y4))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import sys
input = sys.stdin.readline

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

a = x2 -x1
b = y2 -y1

b_v = a
a_v = -b
x3 = x2 + a_v
y3 = y2 + b_v

x4 = x3 -a
y4 = y3 -b
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 = x1 - dy
y4 = y1 + dx

print(x3, y3, x4, y4)

Submission status: Accepted

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

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

vx, vy = (-vy, vx)
x3, y3 = (x2 + vx, y2 + vy)

vx, vy = (-vy, vx)
x4, y4 = (x3 + vx, y3 + vy)

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    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__':
    solve()

Submission status: Accepted

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

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

x_3 = x_2 - y
y_3 = y_2 + x

x_4 = x_1 - y
y_4 = y_1 + x

print(x_3, y_3, x_4, y_4)

Submission status: Accepted

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

Submission status: Accepted

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

xy = [[x1,y1],[x2,y2]]

vec = [x2-x1,y2-y1]

A = [[0,-1],[1,0]]

for i in range(2):
    vec[0],vec[1] = A[0][0]*vec[0]+A[0][1]*vec[1],A[1][0]*vec[0]+A[1][1]*vec[1]
    xy.append([xy[-1][0]+vec[0],xy[-1][1]+vec[1]])

ans = ""
for i in range(2,4):
    ans += " ".join(map(str,xy[i]))
    ans += " "

print(ans[:-1])

Submission status: Accepted

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

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

print(f'{x3} {y3} {x4} {y4}')

Submission status: Accepted

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

delta_x21 = x2 - x1
delta_y21 = y2 - y1
delta_x32 = -delta_y21
delta_y32 = delta_x21
x3 = x2 + delta_x32
y3 = y2 + delta_y32
x4 = x3 - delta_x21
y4 = y3 - delta_y21

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
from collections import defaultdict

def readInt():
  return int(input())
def readInts():
  return list(map(int, input().split()))
def readChar():
  return input()
def readChars():
  return input().split()

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

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
x_distance = x2 - x1
y_distance = y2 - y1
print("{} {} {} {}".format(x2 - y_distance, y2 + x_distance, x1 - y_distance, y1 + x_distance))

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

Submission status: Accepted

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

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

d = [a[2]-c[0], a[3]-c[1]]
e = [d[1]+c[0], -d[0]+c[1]]

ans = []
ans.append(c[0])
ans.append(c[1])
ans.append(e[0])
ans.append(e[1])

L = [str(a) for a in ans]
L = ' '.join(L)
print(L)

Submission status: Accepted

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

dx = abs(x1-x2)
dy = abs(y1-y2)
if x1>x2 and y1>=y2 :
    print(x2+dy,y2-dx,x1+dy,y1-dx)
elif x1>=x2 and y1<y2 :
    print(x2-dy,y2-dx,x1-dy,y1-dx)
elif x1<=x2 and y1>y2 :
    print(x2+dy,y2+dx,x1+dy,y1+dx)
elif x1<x2 and y1<=y2 :
    print(x2-dy,y2+dx,x1-dy,y1+dx)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
x2x1 = x2 - x1
y2y1 = y2 - y1    
v = x2x1 + y2y1 * 1j
turn90 = 0 + 1j
for _ in range(2):
    v = v * turn90
    x2 += int(v.real)
    y2 += int(v.imag)
    print(x2, y2, end=' ')