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

print(x3, y3, x4, y4)

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

Submission status: Accepted

Solution code:
inf = 10 ** 15
mod = 10 ** 9 + 7
x1, y1, x2, y2 = map(int, input().split())
x3, y3 = x2 - (y2-y1), y2 - (x1-x2)
x4, y4 = x3 - (y3-y2), y3 - (x2-x3)
print('{} {} {} {}'.format(x3, y3, x4, y4))

Submission status: Accepted

Solution code:
# coding: utf-8
x1, y1, x2, y2 = map(int, input().split())
if x1 == x2:
    print(x2 - (y2 - y1), y2, x2 - (y2 - y1), y1)
else:
    print(x2 - (y2 - y1), y2 + (x2 - x1), x2 - (y2 - y1) - (x2 - x1), y2 + (x2 - x1) - (y2 - y1))

Submission status: Accepted

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

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

print(x3, y3, x4, y4)

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

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(' '.join(map(str, [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+y1-y2,-x1+y1+x2)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#print#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
from fractions import gcd
def resolve():
    x1,y1,x2,y2=pin()
    a=y2-y1
    b=x2-x1
    x3=x2-a;y3=y2+b
    x4=x1-a;y4=y1+b
    print(x3,y3,x4,y4)
    
        
#%%submit!    
resolve()

Submission status: Accepted

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

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


resolve()

Submission status: Accepted

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

dx = x2 - x1
dy = y2 - y1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fileinput

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

xx = x2 - x1
yy = y2 - y1

x3 = x2 - yy
y3 = y2 + xx

x4 = x1 - yy
y4 = y1 + xx

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
import numpy as np

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

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

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

w = x2 - x1
h = y2 - y1

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
# import math
# from string import ascii_lowercase, ascii_upper_case, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)


def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1               # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    x1, y1, x2, y2 = mi()
    vec = (x2 - x1, y2 - y1)
    vec2 = (- vec[1], vec[0])
    vec3 = (- vec2[1], vec2[0])
    x3, y3 = x2 + vec2[0], y2 + vec2[1]
    x4, y4 = x3 + vec3[0], y3 + vec3[1]
    print("{} {} {} {}".format(x3, y3, x4, y4))


if __name__ == "__main__":
    main()

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

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

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

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

Submission status: Accepted

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

#x_diff = 2 3 6 6
#diff = abs(x1-x2) if x1!=x2 else abs(y1-y2)

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

x_diff_ = x2 - x1
y_diff_ = y2 - y1
#print(x_diff_, y_diff_)
rotate = []
if y_diff_ >= 0:
  if x_diff_ >= 0:
    #print(1)
    rotate = [up, left]
  else:
    #print(2)
    rotate = [left, down]
else:
  if x_diff_ >= 0:
    #print(3)
    rotate = [right, up]
  else:
    #print(4)
    rotate = [down, right]
  
x3, y3 = rotate[0](x2, y2, abs(y2-y1), abs(x2-x1))
#print(abs(y2-y1), abs(x2-x1))
x4, y4 = rotate[1](x3, y3, abs(y3-y2), abs(x3-x2))
#print(abs(y3-y2), abs(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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
x1, y1, x2, y2 = ri_()
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 -(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())

sa_x = x2 - x1
sa_y = y2 - y1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
Ax, Ay, Bx, By = map(int, input().split())
x = Ax - Bx
y = Ay - By

print(Bx + y, By - x, Ax + y, Ay - x)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

xl = x2-x1
yl = y2-y1

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

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

Submission status: Accepted

Solution code:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    x1,y1,x2,y2 = I2()
    v = x2 - x1#x
    w = y2 - y1#y
    print(x2-w,y2+v,x1-w,y1+v)

Submission status: Accepted

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

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

l = x_2 - x_1
m = y_2 - y_1

print(x_2-m, y_2+l, x_1-m, y_1+l)

Submission status: Accepted

Solution code:
import numpy as np
a,b,c,d = map(int,input().split())
X1 = np.array([a,b])
X2 = np.array([c,d])
x = (X2-X1)
x[0],x[1] = -x[1],x[0]
print((X2+x)[0],(X2+x)[1],(X1+x)[0],(X1+x)[1])

Submission status: Accepted

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

Submission status: Accepted

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

if x2>=x1 and y2>=y1:
  x3=x2-abs(y2-y1);y3=y2+abs(x2-x1);x4=x3-abs(y3-y2);y4=y3-abs(x3-x2)

elif x2<=x1 and y2>=y1:
  x3=x2-abs(y2-y1);y3=y2-abs(x2-x1);x4=x3+abs(y3-y2);y4=y3-abs(x3-x2)

elif x2<=x1 and y2<=y1:
  x3=x2+abs(y2-y1);y3=y2-abs(x2-x1);x4=x3+abs(y3-y2);y4=y3+abs(x3-x2)

elif x2>=x1 and y2<=y1:
  x3=x2+abs(y2-y1);y3=y2+abs(x2-x1);x4=x3-abs(y3-y2);y4=y3+abs(x3-x2)

  
print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#2:42

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().strip().split())

v1x, v1y = x2 - x1, y2 - y1
v2x, v2y = -v1y, v1x

x3, y3 = x2 + v2x, y2 + v2y
x4, y4 = x3 - v1x, y3 - v1y

print(x3, y3, x4, y4)

Submission status: Accepted

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

dx = x2 - x1
dy = y2 - y1

nx1 = -dy
ny1 = dx
nx2 = -ny1
ny2 = nx1

print(x2+nx1,y2+ny1,x2+nx1+nx2,y2+ny1+ny2)

Submission status: Accepted

Solution code:
# ABC108B

x1, y1, x2, y2 = map(int, input().split())
if x1 <= x2 and y1 <= y2:
    d4 = x2-x1
    d3 = y2-y1
    print(x2-d3, y2+d4, x1-d3, y1+d4)
elif x1 > x2 and y1 <= y2:
    d4 = y2-y1
    d3 = x1-x2
    print(x2-d4, y2-d3, x1-d4, y1-d3)
elif x1 > x2 and y1 > y2:
    d4 = x1-x2
    d3 = y1-y2
    print(x2+d3, y2-d4, x1+d3, y1-d4)
elif x1 <= x2 and y1  > y2:
    d4 = y1-y2
    d3 = x2-x1
    print(x2+d4, y2+d3, x1+d4, y1+d3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
MOD = 10 ** 9 + 7
INF = 10 ** 11
import sys
sys.setrecursionlimit(100000000)

def main():
    a,b,c,d = map(int,input().split())
    dx = c - a
    dy = d - b
    print(c - dy,d + dx,a - dy,b + dx)
if __name__ == '__main__':
    main()

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

dify=y2-y1
difx=x2-x1

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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())
x=abs(x2-x1)
y=abs(y2-y1)
if x2>x1:
  if y2>y1:
    print(x2-y,y2+x,x1-y,y1+x)
  else:
    print(x2+y,y2+x,x1+y,y1+x)
else:
  if y2>y1:
    print(x2-y,y2-x,x1-y,y1-x)
  else:
    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

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
from copy import deepcopy
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7

a,b,c,d=MI()
e=b+c-d
f=-a+c+d
g=a+b-d
h=b-a+c
print(e,end=" ")
print(f,end=" ")
print(g,end=" ")
print(h,end=" ")

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:
p,q,r,s=map(int,input().split())
print(r-(s-q),s+(r-p),r-(s-q)-(r-p),s+(r-p)-(s-q))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X,Y,Z,W=map(int,input().split())

a=Z-X
b=W-Y
print(Z-b,W+a,X-b,Y+a)

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

Submission status: Accepted

Solution code:
xy = list(map(int, input().split()))
xy1 = xy[0:2]
xy2 = xy[2:4]

d1 = xy2[0] - xy1[0]
d2 = xy2[1] - xy1[1]

xy3 = [xy2[0] - d2, xy2[1] + d1]
xy4 = [xy3[0] - d1, xy3[1] - d2]

print(*(xy3 + xy4))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

od = [x1+y1-y2, y1-x1+x2]
oc = [x2-y2+y1, -x1+x2+y2]

od = map(str, list(od))
oc = map(str, list(oc))

print(' '.join(list(oc)) +' ' + ' '.join(list(od)))

Submission status: Accepted

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

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

Submission status: Accepted

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

x_ = x2-x1
y_ = y2-y1

x_l = abs(x_)
y_l = abs(y_)

if x_ > 0 and y_ >= 0:
    x3 = x2 - y_l
    y3 = y2 + x_l
    x4 = x3 - x_l
    y4 = y3 - y_l

elif x_ < 0 and y_ <= 0:
    x3 = x2 + y_l
    y3 = y2 - x_l
    x4 = x3 + x_l
    y4 = y3 + y_l

elif x_ <= 0 and y_ > 0:
    x3 = x2 - y_l
    y3 = y2 - x_l
    x4 = x3 + x_l
    y4 = y3 - y_l

elif x_ >= 0 and y_ < 0:
    x3 = x2 + y_l
    y3 = y2 + x_l
    x4 = x3 - x_l
    y4 = y3 + y_l


print(int(x3), int(y3), int(x4), int(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:
li = list(map(int,input().split()))
xy1,xy2 = (li[0],li[1]),(li[2],li[3])
div=(xy2[0]-xy1[0],xy2[1]-xy1[1])
print(xy2[0]-div[1],xy2[1]+div[0],xy1[0]-div[1],xy1[1]+div[0],sep=" ")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
try:
    from typing import List
except ImportError:
    pass


def solve(x: "List[int]", y: "List[int]"):
    x1, x2 = x
    y1, y2 = y
    x3 = x2 - (y2 - y1)
    y3 = y2 + (x2 - x1)
    x4 = x3 - (y3 - y2)
    y4 = y3 + (x3 - x2)
    print(x3, y3, x4, y4)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    x = [int()] * (2)  # type: "List[int]"
    y = [int()] * (2)  # type: "List[int]"
    for i in range(2):
        x[i] = int(next(tokens))
        y[i] = int(next(tokens))
    solve(x, y)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

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 numpy as np
import sys

input = sys.stdin.readline

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

yl = (y2 -y1)
xl = (x2 -x1)

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

Submission status: Accepted

Solution code:
A,B,C,D=map(int,input().split());print(C-D+B,D+C-A,A-D+B,B+C-A)

Submission status: Accepted

Solution code:
A,B,C,D = map(int, input().split());print(C-D+B,D+C-A,A-D+B,B+C-A)

Submission status: Accepted

Solution code:
A,B,C,D = map(int, input().split())
print(C-D+B,D+C-A,A-D+B,B+C-A)

Submission status: Accepted

Solution code:
A, B, C, D = map(int, input().split())
print(C-D+B,D+C-A,A-D+B,B+C-A)

Submission status: Accepted

Solution code:
A, B, C, D = map(int, input().split())
dx,dy = C-A,D-B
print(C-dy,D+dx,A-dy,B+dx)

Submission status: Accepted

Solution code:
A, B, C, D = map(int, input().split())

def solve(A,B,C,D):
    dx,dy = C-A,D-B
    ans = [C-dy,D+dx,A-dy,B+dx]
    return ans
print(*solve(A,B,C,D),sep=' ')

Submission status: Accepted

Solution code:
A, B, C, D = map(int, input().split())

def solve(A,B,C,D):
    dx,dy = C-A,D-B
    x,y = C-dy,D+dx
    ans = [x,y]
    x,y = x-dx,y-dy
    ans += [x,y]
    return ans
print(*solve(A,B,C,D),sep=' ')

Submission status: Accepted

Solution code:
A, B, C, D = map(int, input().split())

def solve(A,B,C,D):
    dx,dy = C-A,D-B
    x,y = C-dy,D+dx
    ans = [x,y]
    x,y = x-dx,y-dy
    ans.append(x)
    ans.append(y)
    return ans
print(*solve(A,B,C,D),sep=' ')

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

dx = c - a
dy = d - b

print(c-dy, d+dx, a-dy, b+dx)

Submission status: Accepted

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

#1番座標の原点平行移動
xy1dash = [-1 * xy[0], -1 * xy[1]]

xy2dash = [xy[2] + xy1dash[0], xy[3] + xy1dash[1]]

#pi/4回転後
xy4dash = [-1 * xy2dash[1], xy2dash[0]]
#平行移動戻す
xy4 = [xy4dash[0] - xy1dash[0], xy4dash[1] - xy1dash[1]]

xy3 = [xy4[0] + xy[2] - xy[0], xy4[1] + xy[3] - xy[1]]

print(xy3[0], xy3[1], xy4[0], xy4[1])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    x1, y1, x2, y2 = map(int, readline().rstrip().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())
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())
r=x2-x1
u=y2-y1
x3=x2-u
y3=y2+r
x4=x3-r
y4=y3-u
print("{} {} {} {}".format(x3,y3,x4,y4))

Submission status: Accepted

Solution code:
import math
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 = 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:
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:
list1 = list(map(int,input().split()))
p1 = [list1[0],list1[1]]
p2 = [list1[2],list1[3]]
dv = [-(p2[1]-p1[1]),p2[0]-p1[0]]
p3 = [x1+x2 for x1,x2 in zip(p2,dv)]
p4 = [x1+x2 for x1,x2 in zip(p1,dv)]
[print(x,end=" ") for x in p3+p4]

Submission status: Accepted

Solution code:
def myAnswer(X1,Y1,X2,Y2):
   sub = X2 - X1
   length =  Y2 - Y1
   X3,Y3 = X1 - length,Y2
   X4,Y4 =  X1 - length,Y1
   X3 += sub
   Y3 += sub
   Y4 += sub
   print(X3,Y3,X4,Y4)

def modelAnswer():
   tmp=1
def main():
   X1,Y1,X2,Y2=map(int,input().split())
   myAnswer(X1,Y1,X2,Y2)


if __name__ == '__main__':
   main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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)        

main()

Submission status: Accepted

Solution code:
import math
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:
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("{} {} {} {}".format(x_3, y_3, x_4, y_4))

Submission status: Accepted

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

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

Submission status: Accepted

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

amountx = x2 - x1
amounty = y2 - y1

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

dx, dy = a-c, d-b

print(c-dy, d-dx, a-dy, b-dx)