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:
x_1,y_1,x_2,y_2=tuple(map(int,input().split()))

be=[x_2-x_1,y_2-y_1]
za3=[x_2+(-1)*be[1],y_2+be[0]]
za4=[x_1+(-1)*be[1],y_1+be[0]]

print(za3[0],za3[1],za4[0],za4[1])

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split())
mvx=x2 - x1 # x移動量計算
mvy=y2 - y1 # y移動量計算
# 右上から左上の点求める
y3 = y2 + mvx # y2 から xの移動量足す
x3 = x2 - mvy # x2 から yの移動量減らす
y4 = y1 + mvx # y1 から xの移動量足す
x4 = x1 - mvy # x1 から y の移動量減らす
print(x3,y3,x4,y4)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
a = list(map(int, input().split()))
p1, p2 = a[:2], a[2:]

h1, h2 = p2[0] - p1[0], p2[1] - p1[1]
print(p2[0] - h2, p2[1] + h1, p1[0] - h2, p1[1] + h1)

Submission status: Accepted

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

y = D[2] - D[0]
x = D[1] - D[3]

s = str(D[2] + x) + " " + str(D[3] + y) + " "\
	+ str(D[0] + x) + " " + str(D[1] + y)
print(s)

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())
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())
dy = y2-y1
dx = x2-x1
 
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())
x_diff = x2 - x1
y_diff = y2 - y1
print("{} {} {} {}".format(x2-y_diff, y2+x_diff, x1-y_diff, y1+x_diff))

Submission status: Accepted

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

xlen = x2-x1
ylen = y2-y1

y3 = y2 + xlen
x3 = x2 - ylen
y4 = y3 - ylen
x4 = x3 - xlen

print(x3,y3,x4,y4)

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

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())
# 座標の計算
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-x1) + (y2-y1)i
# -(y2-y1) + (x2-x1)i
n_x, n_y = y1 - y2, x2 - x1
x3, y3 = x2 + n_x, y2 + n_y
x4, y4 = x1 + n_x, y1 + n_y
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
import math
def rotation(x1,y1,x2,y2) :
	rot_rad = math.radians(270)
	
	x3 = (x2-x1) * math.cos(rot_rad) - (y2-y1) * math.sin(rot_rad) + x1
	y3 = (x2-x1) * math.sin(rot_rad) + (y2-y1) * math.cos(rot_rad) + y1
	
	return {"x":x3, "y":y3}

x1,y1,x2,y2 = [int(i) for i in input().split()]
rotated = rotation(x2,y2,x1,y1)
x3 = rotated["x"]
y3 = rotated["y"]
rotated = rotation(x3,y3,x2,y2)
x4 = rotated["x"]
y4 = rotated["y"]

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10**5)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

x1,y1,x2,y2 = li()

vx = x2-x1
vy = y2-y1

x3,y3 = x2-vy, y2+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())

a,b = x2-x1, 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())
xy = [0]*4

xy[0] = x2 + (y1-y2)
xy[1] = y2 + (x2-x1)
xy[2] = x1 + (y1-y2)
xy[3] = y1 + (x2-x1)

print(*xy)

Submission status: Accepted

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

x = x1 - x2
y = y1 - y2
#a1 = y / x
#a2 = -1 / a1
#l = sqrt(x ** 2 + y ** 2)

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = map(int,input().split(" "))
flag = 0
if x2 >= x1 and y2 >= y1:
  flag = 1
elif x2 >= x1 and y2 < y1:
  flag = 2
elif x2 < x1 and y2 >= y1:
  flag = 3
else:
  flag = 4
if flag == 1:
  x3 = x2-(y2-y1)
  y3 = y2+(x2-x1)
  x4 = x1-(y2-y1)
  y4 = y1+(x2-x1)
elif flag == 2:
  x3 = x2+(y1-y2)
  y3 = y2+(x2-x1)
  x4 = x1+(y1-y2)
  y4 = y1+(x2-x1)
elif flag == 3:
  x3 = x2-(y2-y1)
  y3 = y2-(x1-x2)
  x4 = x1-(y2-y1)
  y4 = y1-(x1-x2)
else:
  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())

vector = complex(x2 - x1, y2 - y1)
vector *= complex(0, 1)
xy2 = complex(x2, y2)
xy3 = xy2 + vector
vector *= complex(0, 1)
xy4 = xy3 + vector

print(int(xy3.real), int(xy3.imag),int(xy4.real), int(xy4.imag))

Submission status: Accepted

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

x3 = x2 - ylen
y3 = y2 + xlen
x4 = x3 - xlen
y4 = y3 - ylen

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

Submission status: Accepted

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

vx = x2-x1
vy = y2-y1

x3 = x2 - vy
y3 = y2 + vx

x4 = x3 - vx
y4 = y3 - vy

print(x3, y3, x4, y4)

Submission status: Accepted

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

ad_x = x1 - x2
ad_y = y1 - y2

x3 = x2 + int(ad_y)
x4 = x3 + int(ad_x)

y3 = y2 - int(ad_x)
y4 = y1 - int(ad_x)

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 -(x1 - x2)
x4 = x3 -(y3 - y2)
y4 = y3 -(x2 - x3)

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**13
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)

def distance(x1, y1, x2, y2):
    return math.sqrt((x1-x2)**2 + (y1-y2)**2)

def radian(x1, y1, x2, y2):
    return math.atan2(y2-y1, x2-x1)

# (distance, radian)
def drx(d, r):
    return math.cos(r) * d

def dry(d, r):
    return math.sin(r) * d

def main():
    x1,y1,x2,y2 = LI()
    d = distance(x1, y1, x2, y2)
    r = radian(x1, y1, x2, y2)
    x3 = x1 + int(round(drx(d*(2**0.5), r+math.pi/4)))
    y3 = y1 + int(round(dry(d*(2**0.5), r+math.pi/4)))
    x4 = x1 + int(round(drx(d, r+math.pi/2)))
    y4 = y1 + int(round(dry(d, r+math.pi/2)))

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


print(main())

Submission status: Accepted

Solution code:
def ruined_square(x1, y1, x2, y2):
    x = x2
    y = y2
    dx = x2 - x1
    dy = y2 - y1

    dx, dy = -dy, dx
    x += dx
    y += dy
    print("{} {} ".format(x, y), end = "")

    dx, dy = -dy, dx
    x += dx
    y += dy
    print("{} {}".format(x, y))

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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


if __name__ == '__main__':
    main()

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

y4=y3 + (x3-x2)
x4=x3 -(y3-y2)
print("{} {} {} {}".format(x3,y3,x4,y4))

Submission status: Accepted

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

t = input().rstrip().split(' ')
tl = list(map(lambda x:int(x), t)) 
x = tl[2] - tl[0]
y = tl[3] - tl[1]

c3 = (tl[2] - y, tl[3] + x)
c4 = (tl[0] - y, tl[1] + x)

print('{} {} {} {}'.format(c3[0], c3[1], c4[0], c4[1]))

Submission status: Accepted

Solution code:
## ABC 108 b
x1, y1, x2, y2 = (int(_) for _ in 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, raw_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, raw_input().split())
dire = [[1, 1], [-1, 1], [-1, -1], [1, -1]]


if x2 - x1 >= 0:
    xd = 1
else:
    xd = -1
if y2 - y1 >= 0:
    yd = 1
else:
    yd = -1
index = dire.index([xd, yd])
x3 = x2 + dire[(index+1)%4][0] * abs(y1 - y2)
y3 = y2 + dire[(index+1)%4][1] * abs(x1 - x2)
x4 = x3 + dire[(index+2)%4][0] * abs(y2 - y3)
y4 = y3 + dire[(index+2)%4][1] * abs(x2 - x3)
print x3, y3, x4, y4

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = list(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 math
x1, y1, x2, y2 = map(int, input().split())
p3 = 0
q3 = 0
p4 = 0
q4 = 0

for x3 in range(-301, 301):
    for y3 in range(-301, 301):
        length1 = math.sqrt((x2 - x1)**2 + (y2 - y1)**2)
        length2 = math.sqrt((x3 - x2)**2 + (y3 - y2)**2)
        if x2 != x1 and x3 != x2:
            slope = (y2 - y1)/(x2 - x1)*(y3 - y2)/(x3 - x2)
            if y1 != y2 and length1 == length2 and slope == -1 and\
                x2 > x1 and y3 > (y2 - y1)/(x2 - x1)*x3 +(x2*y1 - y2*x1)/(x2 - x1):
                p3 = x3
                q3 = y3
            elif y1 != y2 and length1 == length2 and slope == -1 and\
                x2 < x1 and y3 < (y2 - y1)/(x2 - x1)*x3 +(x2*y1 - y2*x1)/(x2 - x1):
                p3 = x3
                q3 = y3
        else:
            if x2 == x1 and y2 > y1 and y3 == y2 and x3 == x2 - length1:
                p3 = x3
                q3 = y3
            elif x2 == x1 and y2 < y1 and y3 == y2 and x3 == x2 + length1:
                p3 = x3
                q3 = y3
            elif x2 > x1 and y2 == y1 and x3 == x2 and y3 == y2 + length1:
                p3 = x3
                q3 = y3
            elif x2 < x1 and y2 == y1 and x3 == x2 and y3 == y2 - length1:
                p3 = x3
                q3 = y3

for x4 in range(-301, 301):
    for y4 in range(-301, 301):
        length1 = math.sqrt((p3 - x2)**2 + (q3 - y2)**2)
        length2 = math.sqrt((x4 - p3)**2 + (y4 - q3)**2)
        if x2 != p3 and p3 != x4:
            slope = (q3 - y2)/(p3 - x2)*(y4 - q3)/(x4 - p3)
            if y2 != q3 and length1 == length2 and slope == -1 and\
                p3 > x2 and y4 > (q3 - y2)/(p3 - x2)*x4 +(p3*y2 - q3*x2)/(p3 - x2):
                p4 = x4
                q4 = y4
            elif y2 != q3 and length1 == length2 and slope == -1 and\
                p3 < x2 and y4 < (q3 - y2)/(p3 - x2)*x4 +(p3*y2 - q3*x2)/(p3 - x2):
                p4 = x4
                q4 = y4
        else:
            if p3 == x2 and q3 > y2 and y4 == q3 and x4 == p3 - length1:
                p4 = x4
                q4 = y4
            elif p3 == x2 and q3 < y2 and y4 == q3 and x4 == p3 + length1:
                p4 = x4
                q4 = y4
            elif p3 > x2 and q3 == y2 and x4 == p3 and y4 == q3 + length1:
                p4 = x4
                q4 = y4
            elif p3 < x2 and q3 == y2 and x4 == p3 and y4 == q3 - length1:
                p4 = x4
                q4 = y4

print(p3, q3, p4, q4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = list(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:
x1, y1, x2, y2 = [int(i) for i in input().split()]
dx = x2 - x1
dy = y2 - y1
x3 = x2 - dy
y3 = y2 + dx
x4 = x1 - dy
y4 = y1 + dx
print('{} {} {} {}'.format(x3,y3,x4,y4))

Submission status: Accepted

Solution code:
n=list(map(int,input().split()))
#x1=n[0],y1=n[1],x2=n[2],y2=n[3]
vec=[n[2]-n[0],n[3]-n[1]]
vertvec=[(-1)*vec[1],vec[0]]
x3=n[2]+vertvec[0]
y3=n[3]+vertvec[1]
x4=n[0]+vertvec[0]
y4=n[1]+vertvec[1]
print(x3,y3,x4,y4)

Submission status: Accepted

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = [int(i) for i in input().split()]
V = y2 - y1
H = x2 - x1
print('{} {} {} {}'.format(x2-V, y2+H, x1-V, y1+H))

Submission status: Accepted

Solution code:

l=[int(x) for x in input().split()]
x=l[2]-l[0]
y=l[3]-l[1]
X=-1*x
Y=-1*y
print(l[2]-y,l[3]+x,l[0]+Y,l[1]-X)

Submission status: Accepted

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = [int(_) for _ in input().split()]
p = (x1 + x2 + y1 - y2) / 2
q = (x2 - x1 + y2 + y1) / 2
v = x1 - p
u = y1 - q
x3, y3 = int(p - v), int(q - u)
x4, y4 = int(p + u), int(q - v)
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
z = [0 for _ in range(8)]
z[:4] = list(map(int, input().split()))
for i in range(2):
    z[2*i + 4] = z[2*i + 2] - z[2*i + 3] + z[2*i + 1]
    z[2*i + 5] = z[2*i + 3] + z[2*i + 2] - z[2*i]
print(z[4], z[5], z[6], z[7])

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:
import sys
from fractions import gcd


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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


dx = x2 - x1
dy = y2 - y1

if(dx == 0):
    distance = y2 - y1
    x3 = x2 - distance
    y3 = y2
    x4 = x2 - distance
    y4 = y1
elif(dy == 0):
    distance = x1 -x2
    x3 = x2
    y3 = y2 - distance
    x4 = x1
    y4 = y1 - distance
else:
    x3 = x2 - dy
    y3 = y2 + dx
    x4 = x3 - dx
    y4 = y3 - dy

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

Submission status: Accepted

Solution code:
x = [0]*4
y = [0]*4
x[0], y[0], x[1], y[1] = map(int, input().split())

x[3] = x[0] - (y[1] - y[0])
y[3] = y[0] + (x[1] - x[0])

x[2] = x[1] + x[3] - x[0]
y[2] = y[1] + y[3] - y[0]

print(str(x[2]) + ' ' + str(y[2]) + ' ' + str(x[3]) + ' ' + str(y[3]))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
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("{} {} {} {}".format(x3,y3,x4,y4))

Submission status: Accepted

Solution code:
a,b,c,d=map(int,input().split())
print(str(c-(d-b))+" "+str(d+(c-a))+" "+str(a-(d-b))+" "+str(b+(c-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:
x_1,y_1,x_2,y_2=map(int,input().split())
ans=[]
x=x_2
y=y_2
dx=x_2-x_1
dy=y_2-y_1
for i in range(2):
    dx,dy=dy,dx
    dx=-dx
    x+=dx
    y+=dy
    ans.append(x)
    ans.append(y)
print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x_1,y_1,x_2,y_2 = (int(x) for x in input().split())
x,y = int(x_2 - x_1),int(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())

a = x1 - x2
b = y1 - y2
x3 = x2 + b
y3 = y2 - a
x4 = x1 + b
y4 = y1 - a
print('{}  {}  {}  {}'.format(x3,y3,x4,y4))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Ruined Square
nums = list(map(int, input().split()))
dx = nums[2] - nums[0]
dy = nums[3] - nums[1]
print(nums[2]-dy, nums[3]+dx, nums[2]-dy-dx, nums[3]+dx-dy)

Submission status: Accepted

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

dx = x2 - x1
dy = y2 - y1

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:
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=[int(i) for i in 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());print(b+c-d,d+c-a,a+b-d,c+b-a)

Submission status: Accepted

Solution code:
def f(x1, y1, x2, y2):
    return y1 - y2 + x2, -x1 + x2 + y2

def solve(x1, y1, x2, y2):
    x3, y3 = f(x1, y1, x2, y2)
    x4, y4 = f(x2, y2, x3, y3)
    return " ".join(map(str, [x3, y3, x4, y4]))

assert solve(0,0,0,1) == "-1 1 -1 0"
assert solve(2,3,6,6) == "3 10 -1 7"
assert solve(31,-41,-59,26) == "-126 -64 -36 -131"
x1, y1, x2, y2 = map(int, raw_input().split())
print solve(x1, y1, x2, y2)

Submission status: Accepted

Solution code:
data=[int(i) for i in input().split()]

vec=[data[2]-data[0],data[3]-data[1]]
print('{} {} {} {}'.format(data[2]-vec[1],data[3]+vec[0],data[0]-vec[1],data[1]+vec[0]))

Submission status: Accepted

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

x_3 , y_3 = x_2 - (y_2 - y_1) , y_2 + (x_2 - x_1)
x_4 , y_4 = x_1 - (y_2 - y_1) , 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()))

x = x2 - x1
y = y2 - y1

x3 = x2 - y
y3 = y2 + x

x4 = x1 - y
y4 = y1 + x

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

Submission status: Accepted

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

dx = x2 - x1;
dy = y2 - y1;

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

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = list(map(int, input().split()))
a = x1 - x2
b = y1 - y2
c = x2 - x1
d = y2 - y1

print('{} {} {} {}'.format(x2 + b, y2 + c, x1 + b, y1 + c))

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

print("{} {} {} {}".format(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:
x1, y1, x2, y2 = map(int, input().split())
x_diff = x2 - x1
y_diff = y2 - y1

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

Submission status: Accepted

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

x3 = x2 - (y2 - y1)
y3 = y2 + (x2 - x1)
x4 = x1 - (y2 - y1)
y4 = y1 + (x2 - x1)
print('{0} {1} {2} {3}'.format(x3, y3, x4, y4))

Submission status: Accepted

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

x = a-(d-b)
y = b+(c-a)
z = x+(c-a)
w = y+(d-b)

print(z,w,x,y)

Submission status: Accepted

Solution code:
line = input().split()
#print(line)

x1 = int(line[0])
y1 = int(line[1])
x2 = int(line[2])
y2 = int(line[3])
#print(x1,y1,x2,y2)

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

Submission status: Accepted

Solution code:
a,b,A,B=map(int,input().split( ))

#vec=[A-a,B-b]
tvec=[b-B,A-a]

print(A+tvec[0],B+tvec[1],a+tvec[0],b+tvec[1])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
"""A
K = int(input())
even = 0
odd = 0

for i in range(1,K+1):
	if i%2 == 0:
		even += 1
	else:
		odd += 1

print(even*odd)
"""

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())
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())
h = abs(x2-x1)
v = abs(y2-y1)
if x1 > x2:
  if y1 > y2: print(x2+v,y2-h,x1+v,y1-h)
  else:         print(x2-v,y2-h,x1-v,y1-h)
else:
  if y2 > y1: print(x2-v,y2+h,x1-v,y1+h)
  else:         print(x2+v,y2+h,x1+v,y1+h)

Submission status: Accepted

Solution code:
pos = list(map(int, input().split()))
d = [pos[0] - pos[2], pos[1] - pos[3]]

current = [pos[2] + d[1], pos[3] - d[0]]
print(*current, end=" ")
current = [current[0] + d[0], current[1] + d[1]]
print(*current)

Submission status: Accepted

Solution code:
a = raw_input().strip().split()
[x1,y1,x2,y2] = [int(i) for i in a]
[x3,y3,x4,y4] = [(x2+y1-y2), (x2-x1+y2), (x1+y1-y2), (x2-x1+y1)]
print(str(x3)+" "+str(y3)+" "+str(x4)+" "+str(y4))

Submission status: Accepted

Solution code:
def answer(in0):
    nums = [int(n) for n in in0.split(" ")]
    x1 = int(nums[0])
    y1 = int(nums[1])
    x2 = int(nums[2])
    y2 = int(nums[3])

    width = (x2 - x1)
    height = (y2 - y1)

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

    print(x3, y3, x4, y4)

answer(input())

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a,b,c,d):
    x = c-a
    y = d-b
    x3 = 0
    x4 = 0
    y3 = 0
    y4 = 0
    #print(x,y)
    x3 = c-y
    y3 = d+x
    x4 = x3-x
    y4 = y3-y
    return str(x3) + ' '  + str(y3) + ' ' + str(x4) + ' ' + str(y4) + ' '

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b, str_c, str_d] = line.split(' ')
    return (int(str_a), int(str_b), int(str_c), int(str_d))

def main():
    a, b, c, d = readQuestion()
    answer = solve(a, b, c, d)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

vx = x2-x1
vy = y2-y1

x3 = x2-vy
y3 = y2+vx

x4 = x3-vx
y4 = y3-vy

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

Submission status: Accepted

Solution code:
def solve(string):
    x1, y1, x2, y2 = map(int, string.split(" "))
    x3 = x2 - y2 + y1
    y3 = y2 + x2 - x1
    x4 = x1 - y2 + y1
    y4 = y1 + x2 - x1
    return str("{} {} {} {}".format(x3, y3, x4, y4))


if __name__ == '__main__':
    print(solve(input()))

Submission status: Accepted

Solution code:
import numpy as np
ps = list(map(int, input().split()))
v1 = [ps[2]-ps[0], ps[3]-ps[1]]
res = []
res.append(ps[2]-v1[1])
res.append(ps[3]+v1[0])
res.append(res[0]-v1[0])
res.append(res[1]-v1[1])
print("{} {} {} {}".format(res[0],
                           res[1],
                           res[2],
                           res[3]))

Submission status: Accepted

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

xdif = x2 - x1
ydif = y2 - y1

x3 = x2 - ydif
y3 = y2 + xdif
x4 = x3 - xdif
y4 = y3 - ydif

print(x3,y3,x4,y4)

Submission status: Accepted

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

Ly=y2-y1
Lx=x2-x1

x3=x2-Ly
x4=x1-Ly

y3=y2+Lx
y4=y1+Lx

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

Submission status: Accepted

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

x3 = x2 + y_len
y3 = y2 - x_len
x4 = x3 + x_len
y4 = y3 + y_len

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
def addrad(a,b):
    return -b,a
#B 0 base and get C with addrad*3

x=x1-x2
y=y1-y2
x,y=addrad(x,y)
x,y=addrad(x,y)
x,y=addrad(x,y)
x+=x2
y+=y2
cx=x
cy=y


#A 0 base and get D with addrad*1
x=x2-x1
y=y2-y1
x,y=addrad(x,y)
x+=x1
y+=y1
dx=x
dy=y
print('{} {} {} {}'.format(cx,cy,dx,dy))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
a,b,c,d=map(int,input().split())
e=c-(d-b)
f=d+(c-a)
g=a-(d-b)
h=b+(c-a)
print(e,f,g,h)