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

    #inf = 10**17
    #mod = 10**9 + 7

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

if __name__ == '__main__':
  main()

Submission status: Accepted

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

dx = x1 - x2
dy = y1 - y2

x3 = x2 + dy
y3 = y2 - dx

x4 = x1 + dy
y4 = y1 - dx

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
def main():
    x1, y1, x2, y2 = map(int, readline().split())
    A = complex(x1, y1)
    B = complex(x2, y2)
    routate = 1j
    C = (B-A) * routate + B
    D = (B-A) * routate + A
    print(int(C.real), int(C.imag), int(D.real), int(D.imag))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
## io
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
MIIZ = lambda: list(map(lambda x: x-1, MII()))
## dp
INIT_VAL = 0
DP2 = lambda d1, d2: [[INIT_VAL]*d2 for _ in range(d1)]
DP3 = lambda d1, d2, d3: [[[INIT_VAL]*d3 for _ in range(d2)] for _ in range(d1)]

def main():
    x1, y1, x2, y2 = MII()
    a = x2 - x1
    b = y2 - y1
    x3 = x2 - b
    y3 = y2 + a
    x4 = x1 - b
    y4 = y1 + a
    print(x3, y3, x4, y4)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc108/tasks/abc108_b
x1, y1, x2, y2 = map(int, input().split())
x = x2 - x1
y = y2 - y1

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

Submission status: Accepted

Solution code:
x1, y1, x2, y2=map(int, input().split())
s=x2 -x1
t=y2 -y1
d=s**2 +t**2

if s>=0 and t>=0:
    k=-t
    l=s
elif s<=0 and t<=0:
    k=-t
    l=s
elif s>=0 and t<=0:
    k=-t
    l=s
elif s<=0 and t>=0:
    k=-t
    l=s

x3=x2+k
y3=y2+l
x4=x3-s
y4=y3-t
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007

#A
def A():
    return

#B
def B():
    x1, y1, x2, y2 = LI()
    a = x2 - x1
    b = y2 - y1
    print(x2 - b, y2 + a, x1 - b, y1 + a)
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    B()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = map(int, input().split())
x = x1 - x2
y = y1 - y2
point3 = [x2 + y, y2 - x]
point4 = [x1 + y, y1 - x]
print(*[point3[0], point3[1], point4[0], point4[1]], sep=' ')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from functools import reduce
from fractions import gcd

sys.setrecursionlimit(10 ** 6)


def input(): return sys.stdin.readline().rstrip()

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(x1,y1,x2,y2):
    x,y = [x2-x1, y2-y1]
    p3 = [x2-y, y2+x]
    p4 = [x1-y, y1+x]
    print(p3[0],p3[1],p4[0],p4[1]) 

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,operator,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())
##################################################
x1,y1,x2,y2 = LI()
vector = (x2-x1,y2-y1)
x3,y3 = x2-vector[1],y2+vector[0]
x4,y4 = x1-vector[1],y1+vector[0]
print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    x1,y1,x2,y2=map(int,input().split())
    r=((x2-x1)**2+(y2-y1)**2)**0.5
    ix=(x2-x1)/r
    iy=(y2-y1)/r
    jx=-iy
    jy=ix
    x3=int(x2+r*jx)
    y3=int(y2+r*jy)
    x4=int(x3-r*ix)
    y4=int(y3-r*iy)
    print(x3,y3,x4,y4)

Submission status: Accepted

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

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

side_x=x2-x1
side_y=y2-y1

pattern = [[side_x,side_y],[-side_y,side_x],[-side_x,-side_y],[side_y,side_x]]*2

i = pattern.index([side_x,side_y])
x3,y3 = x2+pattern[i+1][0],y2+pattern[i+1][1]
x4,y4 = x3+pattern[i+2][0],y3+pattern[i+2][1]
print(x3,y3,x4,y4)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC 108: B – Ruined Square
x1, y1, x2, y2 = [int(s) for s in 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())

base_y = y2-y1
base_x = x2-x1

y3 = y2 + base_x
x3 = x2 - base_y

y4 = y1 + base_x
x4 = x1 - base_y


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

print('{} {} {} {}'.format(c - y, d + x, a - y, b + x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# abc108_b.py
# 与えられた正方形が外接する、辺がX,Y軸に平行な正方形を考えるとわかりやす。
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:
# solution
import io

n1, m1, n2, m2 = map(int, input().split())

print(n2-m2+m1, m2+n2-n1, n1-m2+m1, m1+n2-n1)

Submission status: Accepted

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

a = x2 - x1
b = y2 - y1

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

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:
import sys

def main(lines):
  x1, y1, x2, y2 = map(int, lines[0].split())
  x3 = x2 + (y2 - y1) * -1
  y3 = y2 + (x2 - x1)
  x4 = x3 + (y3 - y2) * -1
  y4 = y3 + (x3 - x2)
  print(x3, y3, x4, y4)


if __name__ == '__main__':
    lines = []
    for l in sys.stdin:
        lines.append(l.rstrip('\r\n'))
    main(lines)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix

# strlist = "abcdefghijklmnopqrstuvwxyz"
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)
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))

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

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

Submission status: Accepted

Solution code:
import sys
 
input = sys.stdin.readline
 
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:
a1,b1,a2,b2=map(int,input().split())
c=a2-a1
d=b2-b1
e=-d
f=c
a3=a2+e
b3=b2+f
a4=a3-c
b4=b3-d
print(a3,b3,a4,b4)

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = list(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:
def myAnswer(X1,Y1,X2,Y2):
   X = X2 - X1
   Y = Y2 - Y1
   print(X2 - Y,Y2 + X, X1 - Y, Y1 + X)

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

Submission status: Accepted

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

x1 = np.array([x1,y1])
x2 = np.array([x2,y2])
rot = np.array([[0,-1],[1,0]])
x3 = np.dot(rot,(x2-x1))+x2
x4 = np.dot(rot,(x3-x2))+x3
print(x3[0],x3[1],x4[0],x4[1])

Submission status: Accepted

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

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

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

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

x3 = x2 + dy
y3 = y2 - dx

x4 = x1 + dy
y4 = y1 - dx

print(x3, y3, x4, y4)

Submission status: Accepted

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

print(x3, end=' ')
print(y3, end=' ')
print(x3 - a, end=' ')
print(y3 - b)

Submission status: Accepted

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

Submission status: Accepted

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

vec = (x2-x1, y2-y1)

vec = (-vec[1], vec[0])

x3 = x2 + vec[0]
y3 = y2 + vec[1]

vec = (-vec[1], vec[0])

x4 = x3 + vec[0]
y4 = y3 + vec[1]

print(x3, y3, x4, y4)

Submission status: Accepted

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

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

    midx = x2-x1
    midy = y2-y1

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


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt
from functools import lru_cache, reduce
INF = 1 << 60
mod = 1000000007
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

# UnionFind
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# ダイクストラ
def dijkstra_heap(s, edge, n):
    #始点sから各頂点への最短距離
    d = [10**20] * n
    used = [True] * n #True:未確定
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        #まだ使われてない頂点の中から最小の距離のものを探す
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d

# 素因数分解
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

# 2数の最小公倍数
def lcm(x, y):
    return (x * y) // gcd(x, y)

# リストの要素の最小公倍数
def lcm_list(numbers):
    return reduce(lcm, numbers, 1)

# リストの要素の最大公約数
def gcd_list(numbers):
    return reduce(gcd, numbers)

# ここから書き始める
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:
x_1,y_1,x_2,y_2=map(int,input().split())
s=x_2-x_1
t=y_1-y_2
print(x_2+t,y_2+s,x_1+t,y_1+s)

Submission status: Accepted

Solution code:
a,b,c,d = map(int,input().split())
#a = x1 b = x2 c = y1 d = y2
x_dis = c-a
y_dis = d-b
A = c-y_dis
B = d+x_dis
C = a-y_dis
D = b+x_dis
print(A,B,C,D)

Submission status: Accepted

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

Submission status: Accepted

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

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=[int(i) for i in input().split()]
a=[x2-x1,y2-y1]
b=[y1-y2,x2-x1]
x3=x1+a[0]+b[0]
y3=y1+a[1]+b[1]
x4=x3-a[0]
y4=y3-a[1]
print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()


x1,y1,x2,y2 = na()
x = x2-x1
y = y2-y1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c,d= input().split()
x1,y1,x2,y2=(int(a),int(b),int(c), int(d))
x_dif = x2-x1
y_dif = y2-y1
x_d = abs(x_dif)
y_d=abs(y_dif)
w = x1
z =y2
y =x2
x = y1
if x_dif == 0:
    if y_dif > 0:
        print(x2-abs(y_dif),z,y-abs(y_dif),x)
    else:
        print(x2+abs(y_dif),z,y+abs(y_dif),x)
elif y_dif ==0:
    if x_dif > 0:
        print(x2,y2+abs(x_dif),w,z+abs(x_dif))
    else:
        print(x2,y2-abs(x_dif),w,z-abs(x_dif))
elif x_dif >0 and y_dif >0:
    print(x2- y_d, y2 + x_d, x1-y_d,y1+x_d)
elif x_dif >0 and y_dif <0:
    print(x2+ y_d, y2 + x_d, x1+y_d,y1+x_d)
elif  x_dif <0 and y_dif <0:
    print(x2+y_d, y2 - x_d, x1+y_d,y1-x_d)
elif  x_dif <0 and y_dif >0:
    print(x2- y_d, y2 - x_d, x1-y_d, y1-x_d)

Submission status: Accepted

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

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:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
b = list(map(int, input().split()))
x1=b[0]
y1=b[1]
x2=b[2]
y2=b[3]
xkyori=abs(x1-x2)
ykyori=abs(y1-y2)
if x1>=x2:
    if y1>=y2:
        print(x2+ykyori,y2-xkyori,x1+ykyori,y1-xkyori)
    else:
        print(x2-ykyori,y2-xkyori,x1-ykyori,y1-xkyori)
else:
    if y1>=y2:
        print(x2 + ykyori, y2 + xkyori, x1 + ykyori, y1 + xkyori)
    else:
        print(x2-ykyori,y2+xkyori,x1-ykyori,y1+xkyori)

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

e = c - a
f = d - b 

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

Submission status: Accepted

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

e = c - a
f = d - b 

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

Submission status: Accepted

Solution code:

def RuinedSquare(x1 , y1 , x2 , y2):

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

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

x_diff = x2 - x1
y_diff = y2 - y1

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
#ABC-108-B
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:
x0,y0,x1,y1 = map(int,input().split(" "))
x3 = x1 - (y1-y0)
x4 = x0 - (y1-y0)
y3 = y1 + (x1-x0)
y4 = y0 + (x1-x0)
print("{} {} {} {}".format(x3,y3,x4,y4))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = [int(_) for _ in 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:
a=list(map(int,input().split()))
x=a[2]-a[0]
y=a[3]-a[1]
print(a[2]-y,a[3]+x,a[2]-y-x,a[3]+x-y,end=" ")

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Submission status: Accepted

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

ans=[0,0,0,0]

ans[0] = xx-yy+y
ans[1] = yy+xx-x
ans[2] = x-yy+y
ans[3] = y+xx-x

print(ans[0],ans[1],ans[2],ans[3])

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:
if __name__ == "__main__":
    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:
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,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())
a=x2-x1
b=y2-y1
x3=x2-b
y3=y2+a
print("{} {} {} {}".format(x3,y3,x3-a,y3-b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int,input().split())
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())
v1 = [x2 - x1, y2 - y1]
v = [-v1[1], v1[0]]

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

x3 = x2 + dy
y3 = y2 - dx

x4 = x1 + dy
y4 = y1 - dx

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

x3,y3=x2-vec[1],y2+vec[0]
x4,y4=x3-vec[0],y3-vec[1]

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

Submission status: Accepted

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

Submission status: Accepted

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

print("{} {} {} {}".format(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())
yd = y2 - y1
xd = x2 - x1

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

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

print(x3, y3, x4, y4)