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())
p1 = x1 + y1 * 1j
p2 = x2 + y2 * 1j
vec12 = p2 - p1
p3 = p2 + vec12 * (1j)
p4 = p1 - vec12 * (-1j)
print('{} {} {} {}'.format(int(p3.real), int(p3.imag), int(p4.real), int(p4.imag)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve(x1, y1, x2, y2):
    d1, d2 = x1 - x2, y1 - y2
    x3, y3 = x2 + d2, y2 - d1
    x4, y4 = x3 + d1, y3 + d2
    return '{} {} {} {}'.format(x3, y3, x4, y4)

_x1, _y1, _x2, _y2 = map(int, input().split())
print(solve(_x1, _y1, _x2, _y2))

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:
def rotate_counter(vec):
  return (-vec[1], vec[0])


def apply(point, vec):
  return (point[0] + vec[0], point[1] + vec[1])


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

  vec = rotate_counter(vec)
  (x3, y3) = apply((x2, y2), vec)

  vec = rotate_counter(vec)
  (x4, y4) = apply((x3, y3), vec)

  print(x3, y3, x4, y4)


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
nums = input().split()
x1 = int(nums[0])
y1 = int(nums[1])
x2 = int(nums[2])
y2 = int(nums[3])

X = x2 - x1
Y = y2 - y1

x3 = x2 - Y
y3 = y2 + X

x4 = x3 - X
y4 = y3 - Y

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
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:
import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines


#mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
#import numpy as np


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


if __name__ == "__main__":
	main()

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 23, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

diff_x = (x2-x1) 
diff_y = (y2-y1) 

x3 = x2-diff_y
y3 = y2+diff_x

x4 = x1-diff_y
y4 = y1+diff_x

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

def main():
    a,b,c,d=map(int,input().split())
    l=[a-c,d-b]
    ans1=[c-l[1],d-l[0]]
    ans2=[a-l[1],b-l[0]]
    print(*(ans1+ans2))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x1, y1, x2, y2 = [int(i) for i in input().split()]
dx = x2 - x1
dy = y2 - y1
ans = x2 - dy, y2 + dx, x1 - dy, y1 + dx
print(*ans)

Submission status: Accepted

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
xyList = list(map(int,input().split()))
x = xyList[2]-xyList[0]
y = xyList[3]-xyList[1]
print(xyList[2]-y,xyList[3]+x,xyList[0]-y,xyList[1]+x)

Submission status: Accepted

Solution code:
#coding:utf-8
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 = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())

sys.setrecursionlimit(10 ** 9)


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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

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 = (x1 - x2)
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()))
diff_x = x2 - x1
diff_y = y2 - y1
x3 = x2 - diff_y
y3 = y2 + diff_x
x4 = x1 - diff_y
y4 = y1 + diff_x
print(" ".join(map(str,[x3, y3, x4, y4])))

Submission status: Accepted

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

Submission status: Accepted

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

X = x2 - x1
Y = y2 - y1

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

Submission status: Accepted

Solution code:
import sys

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

def main():
    x3 = x2 + (y1 - y2)
    y3 = y2 - (x1 - x2)
    x4 = x1 + (y1 - y2)
    y4 = y1 - (x1 - x2)
    return x3, y3, x4, y4

if __name__ == '__main__':
    ans = main()
    print(*ans, sep=' ')

Submission status: Accepted

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

yoko = x2 - x1
tate = y2 - y1

x3 = x2 - tate
y3 = y2 + yoko 

x4 = x3 - yoko
y4 = y3 - tate

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 - x2 + x1 = x2 - y2 + y1 - x2 + x1
y4 = y3 - y2 + y1 = y2 - x1 + x2 - y2 + y1
"""

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

if x2 > x1 or y2 > y1:
  x3, y3 = x2 - Y, y2 + X
  x4, y4 = x3 - X, y3 - Y

else:
  x3, y3 = x2 + abs(Y), y2 + X
  x4, y4 = x3 - X, y3 + abs(Y)

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
xy = list(map(int, input().split()))
print(xy[1]-xy[3]+xy[2], -xy[0]+xy[2]+xy[3], xy[0]-xy[3]+xy[1], xy[2]-xy[0]+xy[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a,b,c,d=map(int,input().split())

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

Submission status: Accepted

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

a = x2-x1
b = y2-y1

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

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

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353

x1, y1, x2, y2 = list(map(int, sys.stdin.buffer.readline().split()))

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

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_3 - X
y_4 = y_3 - Y
print(x_3, y_3, x_4, y_4)

Submission status: Accepted

Solution code:
# coding: utf-8

(x1, y1, x2, y2) = [int(i) for i in input().rstrip().split(" ")]

(x3, y3, x4, y4) = [0,0,0,0]
if x1 == x2:
    x3 = x1 - (y2 - y1)
    y3 = y2
    x4 = x3
    y4 = y1

elif y1 == y2:
    x3 = x2
    y3 = y2 + (x2 - x1)
    x4 = x1
    y4 = y3
else:
    x_diff = x2 - x1
    y_diff = y2 - y1
    x3 = x2 - y_diff
    y3 = y2 + x_diff
    x4 = x3 - x_diff
    y4 = y3 - y_diff

print(" ".join([str(i) for i in [x3, y3, x4, y4]]))

Submission status: Accepted

Solution code:
import numpy as np

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

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

rot = np.array([[0, -1], [1, 0]])
ab = b - a
bc = np.dot(rot, ab)

c = b + bc
d = a + bc

# print(a, b)
# print(c, d)

print(*c.flatten(), end=" ")
print(*d.flatten())

Submission status: Accepted

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

Submission status: Accepted

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = [int(x) for x in 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())
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())
lst = []

lst.append(y1-y2+x2)
lst.append(x2-x1+y2)
lst.append(x1+y1-y2)
lst.append(y1+x2-x1)

for i in range(4):
    print(lst[i], end=' ')

Submission status: Accepted

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

x = x2 - x1
y = y2 - y1

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

Submission status: Accepted

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

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

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("{} {} {} {}".format(c-y,d+x,a-y,b+x))

Submission status: Accepted

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

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

diff_x = x_2 - x_1
diff_y = y_2 - y_1

x_3 = x_2 - diff_y
y_3 = y_2 + diff_x

x_4 = x_3 - diff_x
y_4 = y_3 - diff_y

print(x_3,y_3,x_4,y_4)

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
input = sys.stdin.readline
x1, y1, x2, y2 = [int(x) for x in input().split()]
x_ = x2 - x1
y_ = y2 - y1
x3 = x1 - y_
y3 = y1 + x_
x4 = x3 + x_
y4 = y3 + y_
print(* [x4, y4, x3, y3])

Submission status: Accepted

Solution code:
N = list(map(int,input().split()))
x = N[2] - N[0]
y = N[3] - N[1]
for i in range(0,3,2):
	N[i]-=y
	N[i+1]+=x
print(N[2],end=" ")
print(N[3],end=" ")
print(N[0],end=" ")
print(N[1],end=" ")

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:
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())
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())
ans=[]
x3=x2-y2+y1
y3=y2+x2-x1
ans.append(x2-y2+y1)
ans.append(y2+x2-x1)
ans.append(x3-y3+y2)
ans.append(y3+x3-x2)
print(*ans)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys
x1, y1, x2, y2 = map(int, sys.stdin.readline().split())

dx = x2 - x1
dy = y2 - y1

dx1, dy1 = -dy, dx
dx2, dy2 = -dy1, dx1

print(x2+dx1, y2+dy1, x2+dx1+dx2, y2+dy1+dy2)

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

dx = x2 - x1
dy = y2 - y1

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

Submission status: Accepted

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

Submission status: Accepted

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

x = c-a
y = d-b

for el in [c-y, d+x, a-y , b+x]:
    print(el, end=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
a,b,c,d=map(int,input().split())
n=np.array([c-a,d-b])
p=np.array([-n[1],n[0]])
print(*([c,d]+p), end=" ") #print(*([c,d]+p),*([a,b]+p))がPython3.4.3には対応してない？
print(*([a,b]+p))

Submission status: Accepted

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

a,b = x2-x1,y2-y1

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

a = data[2]-data[0]
b = data[3]-data[1]

x3 = data[2]-b
y3 = data[3]+a
x4 = x3-a
y4 = y3-b
print(str(x3)+" "+str(y3)+" "+str(x4)+" "+str(+y4))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
def rect(x1,x2,y1,y2):
    dx = x2-x1
    dy = y2-y1
    ddx = -dy
    ddy = dx
    x3 = x2 + ddx
    y3 = y2 + ddy
    x4 = x1 + ddx
    y4 = y1 + ddy
    return [x3,y3,x4,y4]

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

print(*rect(x1,x2,y1,y2))

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

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

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

Submission status: Accepted

Solution code:
import numpy as np

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

def check():
    x1,y1,x2,y2 = [int(i) for i in input().split()]
    
    vertex1 = np.array([x1-x2,y1-y2])
    vertex2 = np.array([x2-x1,y2-y1])
    x3,y3 = map(int,map(round,rotation(vertex1, -90)))
    x4,y4 = map(int,map(round, rotation(vertex2, 90)))

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

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

x_4,y_4 = x_1-(y_2-y_1) , y_1+(x_2-x_1)
x_3,y_3 = x_2+x_4-x_1 , y_2+y_4-y_1
print(x_3,y_3,x_4,y_4)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

v = (p2[0] - p1[0], p2[1] - p1[1])
v = (-v[1], v[0])
p3 = (p2[0] + v[0], p2[1] + v[1])
v = (p3[0] - p2[0], p3[1] - p2[1])
v = (-v[1], v[0])
p4 = (p3[0] + v[0], p3[1] + v[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

a = [str(x3),str(y3),str(x4),str(y4)]
b = ' '.join(a)
print(b)

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np
import math
from itertools import accumulate

x1,y1,x2,y2 = [int(x) for x in stdin.readline().rstrip().split()]

a = abs(x2-x1)
b = abs(y2-y1)

if x2-x1 >= 0 and y2-y1 >= 0:
    print(x2-b,y2+a,x1-b,y1+a)
elif x2-x1 >= 0 and y2-y1 < 0:
    print(x2+b,y2+a,x1+b,y1+a)
elif x2-x1 < 0 and y2-y1 >= 0:
    print(x2-b,y2-a,x1-b,y1-a)
else:
    print(x2+b,y2-a,x1+b,y1-a)

Submission status: Accepted

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

dx, dy = x2-x1, y2-y1
x, y = x2, y2
ans = []
for i in range(2):
    dx, dy = -dy, dx
    x, y = x+dx, y+dy
    ans.append(x)
    ans.append(y)
for a in ans:
    print(a, end='')
    print(' ', end='')

Submission status: Accepted

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

yd = y1 - y2
xd = x1 - x2

print(x2+yd)
print(y2-xd)
print(x2+yd+xd)
print(y2-xd+yd)

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

Submission status: Accepted

Solution code:
# ABC 108: B – Ruined Square
x1, y1, x2, y2 = [int(s) for s in 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 = [int(i) for i in input().split()]
dx, dy = x2 - x1, y2 - y1
print(x2 - dy, y2 + dx, x2 - dy - dx, y2 + dx - dy)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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, end=' ')
print(y3, end=' ')
print(x4, end=' ')
print(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:
#                         author:  kagemeka 
#                         created: 2019-11-09 18:08:09(JST)
### modules
## from standard library
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics
# import functools
# import operator
## from external libraries
# import scipy.special   
# import scipy.misc      
# import numpy as np 

def main():
    x1, y1, x2, y2 = (int(i) for i in sys.stdin.readline().split())
    
    x3 = x2 + (y1 - y2)
    x4 = x1 + (y1 - y2)
    y3 = y2 - (x1 - x2)
    y4 = y1 - (x1 - x2)
    
    print(x3, y3, x4, y4)


if __name__ == "__main__":
    # execute only if run as a script
    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:
# -*- 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(x3, y3, x4, y4)

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:
def rot(x,y):
    return -y, x

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

xs = x2 - x1
ys = y2 - y1
#print(xs)
#print(ys)

difx = abs(xs)
dify = abs(ys)

if (xs >= 0) and (ys > 0):
    case = "case1"
    x3 = x2 - dify
    y3 = y2 + difx
    x4 = x3 - difx
    y4 = y3 - dify
elif (xs < 0) and (ys >= 0):
    case = "case2"
    x3 = x2 - dify
    y3 = y2 - difx
    x4 = x3 + difx
    y4 = y3 - dify
elif (xs <= 0) and (ys < 0):
    case = "case3"
    x3 = x2 + dify
    y3 = y2 - difx
    x4 = x3 + difx
    y4 = y3 + dify
else:
    case = "case4"
    x3 = x2 + dify
    y3 = y2 + difx
    x4 = x3 - difx
    y4 = y3 + dify

#print(case)
#print(x3)
#print(y3)
#print(x4)
#print(y4)

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

Submission status: Accepted

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

Submission status: Accepted

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