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

# deltax2_1 = x1 - x2
# deltay2_1 = y1 - y2
deltax1_2 = x2 - x1
deltay1_2 = y2 - y1
#
# x3 = x2 + deltay2_1
# y3 = y2 - deltax2_1
# x4 = x1 - deltay1_2
# y4 = y1 + deltax1_2

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


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

Submission status: Accepted

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

deltax2_1 = x1 - x2
deltay2_1 = y1 - y2
deltax1_2 = x2 - x1
deltay1_2 = y2 - y1

x3 = x2 + deltay2_1
y3 = y2 - deltax2_1
x4 = x1 - deltay1_2
y4 = y1 + deltax1_2


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

Submission status: Accepted

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

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

print("{0} {1} {2} {3}".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())
dx, dy = (x2-x1), (y2-y1)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a = x2 - x1
b = y2 - y1

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

x1, y1, x2, y2 = MAP()
a = complex(x1, y1)
b = complex(x2, y2)
rot = complex(cos(pi / 2), sin(pi / 2))
c = b + (b - a) * rot
d = a + (b - a) * rot
print(int(round(c.real, 0)), int(round(c.imag, 0)), int(round(d.real, 0)), int(round(d.imag, 0)))

Submission status: Accepted

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

l = pow(x1 - x2, 2) + pow(y1 - y2, 2)

a1 = complex(x1, y1)
a2 = complex(x2, y2)
a3 = complex(0, -1) * (a1 - a2) + a2
a4 = complex(0, -1) * (a2 - a3) + a3
x3 = int(a3.real)
y3 = int(a3.imag)
x4 = int(a4.real)
y4 = int(a4.imag)
print(x3, y3, x4, y4)

Submission status: Accepted

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from __future__ import print_function

import sys

import re
import array
import copy
import functools
import operator

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd
# fractions.gcd() を用いること
# math.log2()はatcoderでは対応していない．留意せよ．

import collections
import itertools
import bisect

import random
import time

import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue

from itertools import accumulate

from collections import deque
from collections import Counter

from operator import mul
from functools import reduce

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


def lcm(n, m):
    return int(n * m / gcd(n, m))


def coprimize(p, q):
    common = fractions.gcd(p, q)
    return (p // common, q // common)


def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


def main():
    a_x,a_y, b_x,b_y = map(int,input().strip().split())
    e1=b_x - a_x
    e2=b_y-a_y
    c_x=b_x-e2
    c_y=b_y+e1
    d_x=c_x-e1
    d_y=c_y-e2
    print(c_x,c_y,d_x,d_y)
    #c=2a-b


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(complex, input().split())
OA = x1 + y1 * 1j
OB = x2 + y2 * 1j
OD = (1 - 1j) * OA + 1j * OB
OC = OD + OB - OA

x4, y4 = int(OD.real), int(OD.imag)
x3, y3 = int(OC.real), int(OC.imag)
print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
def main():
    x1, y1, x2, y2 = map(int, input().split())
    edge_x = x2 - x1
    edge_y = y2 - y1
    x3, y3 = x2 - edge_y, y2 + edge_x
    x4, y4 = x1 - edge_y, y1 + edge_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=x2+dy*(-1)
y3=y2+dx
dx=x3-x2
dy=y3-y2
x4=x3+dy*(-1)
y4=y3+dx
print(x3,y3,x4,y4)

Submission status: Accepted

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

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

x = x2 - x1
y = y2 - y1

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

Submission status: Accepted

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

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
# Author: cr4zjh0bp
# Created: Sun Mar  8 13:31:56 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

x1, y1, x2, y2 = na()

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
x1, y1, x2, y2 = [int(str) for str in input().strip().split()]

v23x = y1 - y2
v23y = x2 - x1

x3, y3 = x2 + v23x, y2 + v23y

v34x = y2 - y3
v34y = x3 - x2

x4, y4 = x3 + v34x, y3 + v34y

print(x3, y3, x4, y4)

Submission status: Accepted

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

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

x_diff = x2 - x1
y_diff = y2 - y1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):  # リストに重複した要素があるか判定（要素にリストがある場合）
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


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
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())
d = [x1-x2,-(y1-y2)]
print(x2-d[1],y2-d[0],x1-d[1],y1-d[0])

Submission status: Accepted

Solution code:
#ABC108

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

y = y2-y1
x = x2-x1

m = [x2-y,y2+x,x1-y,y1+x]


print(*m)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

x_1,y_1,x_2,y_2=map(int,input().split())
b=y_2-y_1
a=x_2-x_1
print(x_2-b,y_2+a,x_1-b,y_1+a)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

x_1,y_1,x_2,y_2=map(int,input().split())
b=y_2-y_1
a=x_2-x_1
print('{} {} {} {}'.format(x_2-b,y_2+a,x_1-b,y_1+a))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

x_1,y_1,x_2,y_2=map(int,input().split())
x_3=x_2-(y_2-y_1)
y_3=x_2-x_1+y_2
x_4=x_3-(x_2-x_1)
y_4=y_3-(y_2-y_1)
print('{} {} {} {}'.format(x_3,y_3,x_4,y_4))

Submission status: Accepted

Solution code:
#解説AC
#回転行列とベクトルで処理する
x1,y1,x2,y2 = map(int,input().split())
x4 = x1-(y2-y1)
y4 = y1+(x2-x1)
x3 = x2-(y2-y1)
y3 = y2+(x2-x1)
print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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:
# coding: utf-8
# Your code here!
x1, y1, x2, y2 = map(int,input().split())

b = x2 - x1
a = y1 - y2

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

Submission status: Accepted

Solution code:
import sys

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

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

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 = x3 - diff_x
y4 = y3 - diff_y


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

Submission status: Accepted

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

vec1=[(x2-x1),(y2-y1)]
vec2=[-vec1[1],vec1[0]]

ans=[x2+vec2[0],y2+vec2[1]]+[x1+vec2[0],y1+vec2[1]]
print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

if x12>=0 and y12>=0:
    x3=x2-abs(y12)
    y3=y2+abs(x12)
    x4=x3-abs(x12)
    y4=y3-abs(y12)
elif x12>=0 and y12<0:
    x3=x2+abs(y12)
    y3=y2+abs(x12)
    x4=x3-abs(x12)
    y4=y3+abs(y12)
elif x12<0 and y12>=0:
    x3=x2-abs(y12)
    y3=y2-abs(x12)
    x4=x3+abs(x12)
    y4=y3-abs(y12)
else:
    x3=x2+abs(y12)
    y3=y2-abs(x12)
    x4=x3+abs(x12)
    y4=y3+abs(y12)
print('{} {} {} {}'.format(x3,y3,x4,y4))

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    x1,y1,x2,y2=INTM()
    w=x2-x1
    h=y2-y1
    x3=x2-h
    y3=y2+w
    x4=x3-w
    y4=y3-h
    print(x3,y3,x4,y4)
if __name__ == '__main__':
    do()

Submission status: Accepted

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

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

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 - (y3 - y2)
y4 = y3 + (x3 - x2)
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
print(x_2-y, y_2+x, x_1-y, y_1+x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a=x2-x1
b=y2-y1
ans=[x2-b,y2+a,x1-b,y1+a]

for a in ans:
    print(a,end=' ')

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
tmp = diff_x
diff_x = -diff_y
diff_y = tmp

x4 = x3 + (-diff_y)
y4 = y3 + diff_x


print(x3,y3,x4,y4)

Submission status: Accepted

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

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

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

x3=x2-dy
y3=y2+dx

x4=x1-dy
y4=y1+dx

print(x3,y3,x4,y4)

Submission status: Accepted

Solution code:
import math

a,b,c,d = [int(x) for x in 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())
print(x2-(y2-y1),y2+(x2-x1),x1-(y2-y1),y1+(x2-x1))

Submission status: Accepted

Solution code:
#108_B
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())

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

Submission status: Accepted

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

add_1 = x2-x1
add_2 = y2-y1

x3, y3 = x2-add_2, y2+add_1
x4, y4 = x3-add_1, y3-add_2

print(x3, y3, x4, y4)

Submission status: Accepted

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

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:
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter
from math import factorial
from bisect import bisect_left # bisect_left(list, value)
#from fractions import gcd

sys.setrecursionlimit(10**7)
x1, y1, x2, y2 = map(int, input().split())

v1 = x2 - x1, y2 - y1
v2 = -v1[1], v1[0]
v3 = -v2[1], v2[0]

x3, y3 = x2 + v2[0], y2 + v2[1]
x4, y4 = x3 + v3[0], y3 + v3[1]

print(x3, y3, x4, y4)

Submission status: Accepted

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

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

print(x3, y3, x4, y4)

Submission status: Accepted

Solution code:
import numpy as np
 
x1,y1,x2,y2 = map(int,input().split())
 
x1y1 = np.array([x1,y1])
x2y2 = np.array([x2,y2])
 
vector = x1y1 - x2y2
rotation = np.array([[0,1],
                     [-1,0]])
rotated_vector = np.dot(rotation,vector)
x3y3 = x2y2 + rotated_vector
x4y4 = x3y3 + vector
 
print(*x3y3,end=" ")
print(*x4y4)

Submission status: Accepted

Solution code:
import numpy as np
 
x1,y1,x2,y2 = map(int,input().split())
 
x1y1 = np.array([x1,y1])
x2y2 = np.array([x2,y2])
 
vector = x1y1 - x2y2
rotation = np.array([[0,1],
                     [-1,0]])
rotated_vector = np.dot(rotation,vector)
x3y3 = x2y2 + rotated_vector
x4y4 = x3y3 + vector
 
print(x3y3[0],x3y3[1],x4y4[0],x4y4[1])

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
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=x2-x1,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, y = x2 - x1, 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 = x2 - x1
B = y2 - y1

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

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    x1, y1, x2, y2 = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    dx = x2-x1
    dy = y2-y1
    
    tmp=dx
    dx = -dy
    dy = tmp
    x_3 = x2 +dx
    y_3 = y2 +dy

    tmp=dx
    dx = -dy
    dy = tmp
    x_4 = x_3 +dx
    y_4 = y_3 +dy
    print(x_3,y_3,x_4,y_4)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

dx = abs(x1 - x2)
dy = abs(y1 - y2)

if y1 < y2:
  x3 = x2 - dy
  x4 = x1 - dy
else:
  x3 = x2 + dy
  x4 = x1 + dy
if x1 < x2:
  y3 = y2 + dx
  y4 = y1 + dx
else:
  y3 = y2 - dx
  y4 = y1 - dx
  
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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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

    x, y = X2 - X1, Y2 - Y1
    print(X2 - y, Y2 + x, X1 - y, Y1 + x)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x1,y1,x2,y2 = [int(i) for i in input().split()]
x3 = x2 + y1 - y2
y3 = y2 + x2 - x1
x4 = x1 - x2 + x3
y4 = y3 + y1 - y2
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())
v1 = [x2-x1, y2-y1]
v2 = [-v1[1], v1[0]]
x3 = x2+v2[0]
y3  = y2+v2[1]
x4 = x3+x1-x2
y4 = y3+y1-y2
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())
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())
dx=abs(x1-x2)
dy=abs(y1-y2)
if x1<x2 and y1<=y2:
    x3=x2-dy
    y3=y2+dx
    x4=x3-dx
    y4=y3-dy
elif x1>=x2 and y1<y2:
    x3=x2-dy
    y3=y2-dx
    x4=x3+dx
    y4=y3-dy
elif x1>x2 and y1>=y2:
    x3=x2+dy
    y3=y2-dx
    x4=x3+dx
    y4=y3+dy
elif x1<=x2 and y1>y2:
    x3=x2+dy
    y3=y2+dx
    x4=x3-dx
    y4=y3+dy
else:
    print("NA")
print(x3,y3,x4,y4)

Submission status: Accepted

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

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

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:
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)
    # abs(x2 - x1)とすると詰み．ベクトルとして符号付きで扱う．
    # 結局dx > 0, dy > 0のときの式がそのまま使える?


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
L = len(A)
ans = [0, 0, 0, 0]
dx = A[2] - A[0]
dy = A[3] - A[1]
if(dx>=0 and dy>=0):
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] - dy
    y3 = A[3] + dx
    x4 = x3 - dx
    y4 = y3 - dy
elif(dx>0 and dy<0):
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] + dy
    y3 = A[3] + dx
    x4 = x3 - dx
    y4 = y3 + dy
elif(dx<=0 and dy<=0):
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] + dy
    y3 = A[3] - dx
    x4 = x3 + dx
    y4 = y3 + dy
elif(dx<0 and dy>0):
    dx = abs(dx)
    dy = abs(dy)
    x3 = A[2] - dy
    y3 = A[3] - dx
    x4 = x3 + dx
    y4 = y3 - dy

ans[0] = str(x3)
ans[1] = str(y3)
ans[2] = str(x4)
ans[3] = str(y4)
ans = ' '.join(ans)
print(ans)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ベクトルで考える
x1,y1,x2,y2 =map(int, input().split())
x3=x2+(y1-y2)
y3=y2-(x1-x2)
x4=x1+(y1-y2)
y4=y1-(x1-x2)
print(x3,y3,x4,y4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y,s,t=map(int,input().split());a,b=y-t,s-x;print(s+a,t+b,x+a,y+b)

Submission status: Accepted

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

dis_x = x1 - x2
dis_y = y1 - y2

x3 = x2 + dis_y
y3 = y2 - dis_x

x4 = x3 + dis_x
y4 = y3 + dis_y

print(x3, y3, x4, y4)

Submission status: Accepted

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

dif_x = x2 - x1
dif_y = y2 - y1

print(x2 - dif_y, y2 + dif_x, x2 - dif_x - dif_y, y2 + dif_x - dif_y)

Submission status: Accepted

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

inc_x = x2 - x1
inc_y = y2 - y1
l = max(abs(inc_x), abs(inc_y))

if x1 == x2 and y1 > y2:
    print(x2 + l, y2, x1 + l, y1)
elif x1 == x2:
    print(x2 - l, y2, x1 - l, y1)
elif y1 == y2:
    print(x2, y2 - l, x1, y1 - l)
else:
    print(x2 - inc_y, y2 + inc_x, x1 - inc_y, y1 + inc_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,x2-Y-X,y2+X-Y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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