Pashmak has fallen in love with an attractive girl called Parmida since one year ago...

Today, Pashmak set up a meeting with his partner in a romantic garden. Unfortunately, Pashmak has forgotten where the garden is. But he remembers that the garden looks like a square with sides parallel to the coordinate axes. He also remembers that there is exactly one tree on each vertex of the square. Now, Pashmak knows the position of only two of the trees. Help him to find the position of two remaining ones.


-----Input-----

The first line contains four space-separated x_1, y_1, x_2, y_2 ( - 100 ≤ x_1, y_1, x_2, y_2 ≤ 100) integers, where x_1 and y_1 are coordinates of the first tree and x_2 and y_2 are coordinates of the second tree. It's guaranteed that the given points are distinct.


-----Output-----

If there is no solution to the problem, print -1. Otherwise print four space-separated integers x_3, y_3, x_4, y_4 that correspond to the coordinates of the two other trees. If there are several solutions you can output any of them. 

Note that x_3, y_3, x_4, y_4 must be in the range ( - 1000 ≤ x_3, y_3, x_4, y_4 ≤ 1000).


-----Examples-----
Input
0 0 0 1

Output
1 0 1 1

Input
0 0 1 1

Output
0 1 1 0

Input
0 0 1 2

Output
-1

Difficulty: EASY
Tags: Implementation

Starter code:

Solutions:
(x1, y1, x2, y2) = map(int, input().split())
f = 0
if y2 - y1 == 0:
	d = abs(x2 - x1)
	y3 = y2 + d
	x3 = x2
	y4 = y1 + d
	x4 = x1
elif x2 - x1 == 0:
	d = abs(y2 - y1)
	x3 = x2 + d
	y3 = y2
	x4 = x1 + d
	y4 = y1
elif abs((y2 - y1) / (x2 - x1)) == 1.0:
	if x1 < x2:
		x3 = x2
		y3 = y1
		x4 = x1
		y4 = y2
	else:
		x3 = x1
		y3 = y2
		x4 = x2
		y4 = y1
else:
	f = 1
if f == 1:
	print(-1)
else:
	print(x3, y3, x4, y4)


(x1, y1, x2, y2) = map(int, input().split())
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
elif x1 == x2:
	print(x1 + abs(y1 - y2), y1, x2 + abs(y1 - y2), y2)
elif y1 == y2:
	print(x1, y1 + abs(x1 - x2), x2, y2 + abs(x1 - x2))
else:
	print(x1, y2, x2, y1)


(a, b, c, d) = [int(x) for x in input().split()]
if a == c and b == d:
	print(-1)
elif a == c:
	print(a + d - b, b, a + d - b, d)
elif b == d:
	print(a, b + a - c, c, d + a - c)
elif abs(c - a) == abs(d - b):
	print(a, d, c, b)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split(' '))
if x1 == x2:
	l = abs(y2 - y1)
	x3 = x1 + l
	x4 = x2 + l
	y3 = y1
	y4 = y2
	print(x3, y3, x4, y4)
elif y1 == y2:
	x3 = x1
	x4 = x2
	l = abs(x2 - x1)
	y3 = y1 + l
	y4 = y2 + l
	print(x3, y3, x4, y4)
elif abs(x2 - x1) != abs(y2 - y1):
	print(-1)
else:
	l = abs(x2 - x1)
	if y1 < y2:
		x3 = x1
		y3 = y1 + l
		x4 = x2
		y4 = y2 - l
	else:
		x3 = x1
		y3 = y1 - l
		x4 = x2
		y4 = y2 + l
	print(x3, y3, x4, y4)


(a, b, c, d) = map(int, input().split())
l = abs(a - c)
m = abs(b - d)
if a == c:
	print(a + m, b, c + m, d)
elif b == d:
	print(a, b + l, c, d + l)
elif l != m:
	print(-1)
else:
	print(a, d, c, b)


(x1, y1, x2, y2) = map(int, input().split())
rise = y2 - y1
run = x2 - x1
if run != 0:
	m = rise / run
	if m == 1.0 or m == -1.0:
		x1 += run
		x2 -= run
		print(x1, y1, x2, y2)
	elif rise == 0:
		y1 -= run
		y2 -= run
		print(x1, y1, x2, y2)
	else:
		print(-1)
else:
	x1 += rise
	x2 += rise
	print(x1, y1, x2, y2)


(x1, y1, x2, y2) = [int(i) for i in input().split()]
if x1 == x2:
	print(x1 + abs(y1 - y2), y1, x1 + abs(y1 - y2), y2)
elif y1 == y2:
	print(x1, y1 + abs(x1 - x2), x2, y1 + abs(x1 - x2))
elif abs(x1 - x2) == abs(y1 - y2):
	print(x1, y2, x2, y1)
else:
	print(-1)


(x1, y1, x2, y2) = list(map(int, input().split()))
if x1 == x2:
	x3 = x1 + y2 - y1
	x4 = x3
	y3 = y1
	y4 = y2
elif y1 == y2:
	x3 = x1
	y3 = y1 + x2 - x1
	x4 = x2
	y4 = y3
elif abs(x1 - x2) != abs(y1 - y2):
	print('-1')
	exit(0)
else:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
print(x3, y3, x4, y4)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2 and y1 != y2:
	dist = y1 - y2
	print(x1 + dist, y1, x2 + dist, y2)
elif x1 != x2 and y1 == y2:
	dist = x1 - x2
	print(x1, y1 + dist, x2, y2 + dist)
elif x1 - x2 == y1 - y2 or x1 - x2 == y2 - y1:
	print(x1, y2, x2, y1)
else:
	print(-1)


def solve(x1, y1, x2, y2):
	if x1 == x2:
		side = abs(y2 - y1)
		x = x1 + side
		return [x, y1, x, y2]
	elif y1 == y2:
		side = abs(x2 - x1)
		y = y1 + side
		return [x1, y, x2, y]
	elif abs(x2 - x1) == abs(y2 - y1):
		return [x1, y2, x2, y1]
	else:
		return None

def main():
	(x1, y1, x2, y2) = [int(i) for i in input().strip().split()]
	result = solve(x1, y1, x2, y2)
	if result is None:
		print(-1)
	else:
		print(' '.join((str(n) for n in result)))
main()


def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
import math
(a, b, c, d) = mi()
xd = a - c
yd = b - d
dif = max(xd, yd)
if xd == yd == 0:
	print(-1)
	exit()
if xd != 0 and yd != 0 and (abs(xd) != abs(yd)):
	print(-1)
	exit()
if xd == 0 or yd == 0:
	diff = max(abs(xd), abs(yd))
	if a == c:
		a1 = a + diff
		a2 = c + diff
		b1 = b
		b2 = d
	elif b == d:
		b1 = b + diff
		b2 = d + diff
		a1 = a
		a2 = c
elif abs(xd) == abs(yd):
	a1 = a - xd
	b1 = b
	a2 = a
	b2 = b - yd
print(a1, b1, a2, b2)


m = list((int(x) for x in input().split()))
x1 = m[0]
y1 = m[1]
x2 = m[2]
y2 = m[3]
dx = abs(x1 - x2)
dy = abs(y1 - y2)
if not dx:
	y3 = y1
	y4 = y2
	x3 = x1 + dy
	x4 = x2 + dy
	print(x3, y3, x4, y4)
elif not dy:
	x3 = x1
	x4 = x2
	y3 = y1 + dx
	y4 = y2 + dx
	print(x3, y3, x4, y4)
elif dx == dy:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	print(x3, y3, x4, y4)
else:
	print('-1')


def process(x1, y1, x2, y2):
	if x1 == x2:
		print('{0} {1} {0} {2}'.format(x1 + abs(y2 - y1), y1, y2))
	elif y1 == y2:
		print('{1} {0} {2} {0}'.format(y1 + abs(x2 - x1), x1, x2))
	elif abs(y2 - y1) == abs(x2 - x1):
		print('{0} {3} {2} {1}'.format(x1, y1, x2, y2))
	else:
		print(-1)

def __starting_point():
	process(*(int(i) for i in input().split(' ')))
__starting_point()


(r1, c1, r2, c2) = input().split()
x1 = []
x2 = []
x1 = [int(r1), int(c1)]
x2 = [int(r2), int(c2)]
if x1[0] == x2[0]:
	if x1[0] >= 0:
		f1 = x1[0] + abs(x2[1] - x1[1])
		print(f1, ' ', x1[1], ' ', f1, ' ', x2[1])
	if x1[0] < 0:
		f1 = x1[0] + abs(x2[1] - x1[1])
		print(f1, ' ', x1[1], ' ', f1, ' ', x2[1])
elif x1[1] == x2[1]:
	f1 = x1[1] + abs(x2[0] - x1[0])
	print(x1[0], ' ', f1, ' ', x2[0], ' ', f1)
elif x1[0] != x2[0] and x1[1] != x2[1]:
	if abs(x2[0] - x1[0]) != abs(x2[1] - x1[1]):
		print('-1')
	else:
		print(x1[0], ' ', x2[1], ' ', x2[0], ' ', x1[1])


def pash(x1, y1, x2, y2):
	if x1 == x2:
		s = abs(y1 - y2)
		print(x1 + s, y1, x2 + s, y2)
	elif y1 == y2:
		s = abs(x1 - x2)
		print(x1, y1 + s, x2, y2 + s)
	elif abs(y1 - y2) == abs(x1 - x2):
		print(x1, y2, x2, y1)
	else:
		print(-1)
l = list(map(int, input().split()))
pash(l[0], l[1], l[2], l[3])


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	a = max(y1, y2) - min(y1, y2)
	print(x1 + a, y1, x2 + a, y2, sep=' ')
elif y1 == y2:
	a = max(x1, x2) - min(x1, x2)
	print(x1, y1 + a, x2, y2 + a, sep=' ')
else:
	a1 = max(x1, x2) - min(x1, x2)
	a2 = max(y1, y2) - min(y1, y2)
	if a1 != a2:
		print(-1)
	else:
		print(x1, y2, x2, y1, sep=' ')


(a, b, c, d) = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
(p, q, r, s) = (0, 0, 0, 0)
if a == c and b > d:
	temp = b - d
	p = r = a + temp
	q = b
	s = d
	print(p, q, r, s)
elif a == c and b < d:
	temp = d - b
	p = r = a + temp
	q = b
	s = d
	print(p, q, r, s)
elif b == d and c > a:
	temp = c - a
	p = a
	r = c
	q = s = b + temp
	print(p, q, r, s)
elif b == d and a > c:
	temp = a - c
	p = a
	q = s = b + temp
	r = c
	print(p, q, r, s)
elif a != c and b != d:
	t1 = a - c
	t2 = b - d
	if abs(t1) == abs(t2):
		if c > a and d > b:
			temp = c - a
			p = a
			q = b + temp
			r = a + temp
			s = b
			print(p, q, r, s)
		elif c < a and d < b:
			temp = a - c
			p = a
			q = b - temp
			r = a - temp
			s = b
			print(p, q, r, s)
		elif c > a and d < b:
			temp = c - a
			p = a
			q = b - temp
			r = a + temp
			s = b
			print(p, q, r, s)
		elif c < a and d > b:
			temp = d - b
			p = a
			q = b + temp
			r = a - temp
			s = b
			print(p, q, r, s)
	else:
		print(-1)


st = input().split()
if int(st[0]) <= int(st[2]):
	x1 = int(st[0])
	y1 = int(st[1])
	x2 = int(st[2])
	y2 = int(st[3])
else:
	x2 = int(st[0])
	y2 = int(st[1])
	x1 = int(st[2])
	y1 = int(st[3])
if x1 != x2 and y1 != y2 and (abs(x1 - x2) == abs(y1 - y2)):
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
	ans = str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4) + ' '
	print(ans)
elif x1 != x2 and y1 == y2:
	dif = abs(x1 - x2)
	x3 = x1
	y3 = y1 + dif
	x4 = x2
	y4 = y2 + dif
	ans = str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4) + ' '
	print(ans)
elif x1 == x2 and y1 != y2:
	dif = abs(y1 - y2)
	x3 = x1 + dif
	y3 = y1
	x4 = x2 + dif
	y4 = y2
	ans = str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4) + ' '
	print(ans)
else:
	print(-1)


s = [int(i) for i in input().split()]
x1 = s[0]
y1 = s[1]
x2 = s[2]
y2 = s[3]
l = 0
if x1 == x2:
	l = abs(y2 - y1)
	y3 = y1
	y4 = y2
	if l + x1 <= 1000:
		x3 = l + x1
		x4 = x3
	else:
		x3 = x1 - l
		x4 = x3
	print(x3, y3, x4, y4)
elif y1 == y2:
	l = abs(x2 - x1)
	x3 = x1
	x4 = x2
	if l + y1 <= 1000:
		y3 = l + y1
		y4 = y3
	else:
		y3 = y1 - l
		y4 = y3
	print(x3, y3, x4, y4)
elif abs(x2 - x1) != abs(y2 - y1):
	print('-1')
else:
	if x1 < x2:
		x3 = x1
		y3 = y2
		x4 = x2
		y4 = y1
	else:
		x3 = x2
		x4 = x1
		y3 = y1
		y4 = y2
	print(x3, y3, x4, y4)


def main():
	(x1, y1, x2, y2) = map(int, input().split(' '))
	if x1 == x2 and y1 == y2:
		return None
	a = max(x1, x2) - min(x1, x2)
	b = max(y1, y2) - min(y1, y2)
	c = max(a, b)
	s = set()
	s.add((min(x1, x2), min(y1, y2)))
	s.add((min(x1, x2) + c, min(y1, y2)))
	s.add((min(x1, x2), min(y1, y2) + c))
	s.add((min(x1, x2) + c, min(y1, y2) + c))
	ret = []
	for ss in s:
		if ss[0] == x1 and ss[1] == y1:
			continue
		if ss[0] == x2 and ss[1] == y2:
			continue
		ret.append(ss[0])
		ret.append(ss[1])
	return ret
ret = main()
print(' '.join(map(str, ret))) if len(ret) == 4 else print('-1')


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
(x1, y1, x2, y2) = invr()
if x1 == x2:
	print(x1 + y2 - y1, y1, x1 + y2 - y1, y2)
elif y1 == y2:
	print(x1, y1 + x2 - x1, x2, y1 + x2 - x1)
elif abs(x1 - x2) == abs(y1 - y2):
	print(x1, y2, x2, y1)
else:
	print(-1)


(a, b, c, d) = map(int, input().strip().split())
if b == d:
	print(a, b + (c - a), c, b + (c - a))
elif a == c:
	print(a + (b - d), b, c + (b - d), d)
elif abs(d - b) != abs(c - a):
	print(-1)
else:
	print(c, b, a, d)


(x1, y1, x2, y2) = map(int, input().split())
(tx2, ty2) = (x2 - x1, y2 - y1)
if tx2 != 0 and ty2 != 0 and (abs(ty2) != abs(tx2)):
	print(-1)
elif tx2 and ty2:
	print(tx2 + x1, y1, x1, ty2 + y1)
elif tx2:
	print(tx2 + x1, tx2 + y1, x1, tx2 + y1)
elif ty2:
	print(ty2 + x1, 0 + y1, ty2 + x1, ty2 + y1)


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

def verify():
	global x1, y1, x2, y2
	if x1 != x2:
		m = abs(math.degrees(math.atan((y2 - y1) / (x2 - x1))))
	else:
		m = 90
	if m in (0, 45, 90):
		return m
	else:
		return None
slope = verify()
(x3, y3, x4, y4) = [None for i in range(4)]
if slope != None:
	distance = round(((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5)
	if slope in (0, 90):
		if slope == 0:
			(x3, y3) = (x1, y1 + distance)
			(x4, y4) = (x2, y2 + distance)
		else:
			(x3, y3) = (x1 + distance, y1)
			(x4, y4) = (x2 + distance, y2)
	else:
		(x3, y3) = (x1, y2)
		(x4, y4) = (x2, y1)
	print(x3, y3, x4, y4)
else:
	print('-1')


import math
(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	a = abs(y2 - y1)
	print(x1 + a, y1, x2 + a, y2)
elif y1 == y2:
	a = abs(x2 - x1)
	print(x1, y1 + a, x2, y2 + a)
elif abs(x2 - x1) == abs(y2 - y1):
	print(x2, y1, x1, y2)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
a = abs(x1 - x2)
b = abs(y1 - y2)
if x1 == x2:
	print(x1 + b, y1, x2 + b, y2)
elif y1 == y2:
	print(x1, y1 + a, x2, y2 + a)
elif a != b:
	print(-1)
else:
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = list(map(int, input().split()))
if (x1 - x2) * (y1 - y2) != 0:
	if abs(x1 - x2) != abs(y1 - y2):
		print(-1)
	else:
		print(x1, y2, x2, y1)
elif x1 == x2:
	le = abs(y1 - y2)
	if x1 + le > 1000:
		x = x1 - le
	else:
		x = x1 + le
	print(x, y1, x, y2)
else:
	le = abs(x1 - x2)
	if y1 + le > 1000:
		y = y1 - le
	else:
		y = y1 + le
	print(x1, y, x2, y)


import math

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

def seq(x1, x2, y1, y2):
	dist1 = dist(x1, x1, y1, y2)
	dist2 = dist(x1, x2, y1, y1)
	dist3 = dist(x1, x2, y2, y2)
	dist4 = dist(x2, x2, y1, y2)
	if dist1 == dist2 == dist3 == dist4:
		return True
	else:
		return False
inputs = input()
inputs = inputs.split(' ')
coordinates = {}
square = False
if inputs[0] == inputs[2]:
	coordinates['x1'] = inputs[0]
	coordinates['y1'] = inputs[1]
	coordinates['y2'] = inputs[3]
	x2 = int(coordinates['x1']) + (int(coordinates['y1']) - int(coordinates['y2']))
	coordinates['x2'] = int(coordinates['x1']) + (int(coordinates['y2']) - int(coordinates['y1']))
	if seq(int(coordinates['x1']), coordinates['x2'], int(coordinates['y1']), int(coordinates['y2'])):
		print(str(coordinates['x2']) + ' ' + coordinates['y1'] + ' ' + str(coordinates['x2']) + ' ' + coordinates['y2'])
		square = True
	elif seq(int(coordinates['x1']), x2, int(coordinates['y1']), int(coordinates['y2'])):
		print(str(x2) + ' ' + coordinates['y1'] + ' ' + str(x2) + ' ' + coordinates['y2'])
		square = True
elif inputs[1] == inputs[3]:
	coordinates['x1'] = inputs[0]
	coordinates['y1'] = inputs[1]
	coordinates['x2'] = inputs[2]
	y2 = int(coordinates['y1']) + (int(coordinates['x1']) - int(coordinates['x2']))
	coordinates['y2'] = int(coordinates['y1']) + (int(coordinates['x1']) - int(coordinates['x2']))
	if seq(int(coordinates['x1']), int(coordinates['x2']), int(coordinates['y1']), int(coordinates['y2'])):
		print(coordinates['x1'] + ' ' + str(coordinates['y2']) + ' ' + coordinates['x2'] + ' ' + str(coordinates['y2']))
		square = True
	elif seq(int(coordinates['x1']), int(coordinates['x2']), int(coordinates['y1']), y2):
		print(coordinates['x1'] + ' ' + str(y2) + ' ' + coordinates['x2'] + ' ' + str(y2))
		square = True
else:
	coordinates['x1'] = inputs[0]
	coordinates['y1'] = inputs[1]
	coordinates['x2'] = inputs[2]
	coordinates['y2'] = inputs[3]
	if seq(int(inputs[0]), int(inputs[2]), int(inputs[1]), int(inputs[3])):
		square = True
		print(coordinates['x1'] + ' ' + coordinates['y2'] + ' ' + coordinates['x2'] + ' ' + coordinates['y1'])
if square == False:
	print(-1)


(x, y, x1, y1) = map(int, input().split())
if x == x1 and y != y1:
	d = abs(y - y1)
	print(x + d, y, x1 + d, y1)
elif x != x1 and y == y1:
	print(x, y - abs(x - x1), x1, y - abs(x - x1))
elif x != x1 and y != y1 and (abs(x1 - x) == abs(y1 - y)):
	print(x, y1, x1, y)
else:
	print('-1')


a = list(map(int, input().split()))
x1 = a[0]
y1 = a[1]
x2 = a[2]
y2 = a[3]
ans = []
if x1 == x2:
	dis = abs(y2 - y1)
	ans.append(str(x1 + dis))
	ans.append(str(y1))
	ans.append(str(x1 + dis))
	ans.append(str(y2))
	print(' '.join(ans))
elif y1 == y2:
	dis = abs(x2 - x1)
	ans.append(str(x2))
	ans.append(str(y2 + dis))
	ans.append(str(x1))
	ans.append(str(y1 + dis))
	print(' '.join(ans))
elif abs(x2 - x1) == abs(y2 - y1):
	ans.append(str(x1))
	ans.append(str(y2))
	ans.append(str(x2))
	ans.append(str(y1))
	print(' '.join(ans))
else:
	print(-1)


a = list(map(int, input().rstrip().split()))
x1 = a[0]
y1 = a[1]
x2 = a[2]
y2 = a[3]
if x1 == x2 and y1 != y2:
	x3 = x1 + abs(y2 - y1)
	x4 = x3
	y3 = y1
	y4 = y2
	print(x3, y3, x4, y4)
elif x1 != x2 and y1 == y2:
	y3 = y1 + abs(x2 - x1)
	y4 = y3
	x3 = x2
	x4 = x1
	print(x3, y3, x4, y4)
elif x1 != x2 and y1 != y2 and (abs(x2 - x1) == abs(y2 - y1)):
	x3 = x2
	x4 = x1
	y3 = y1
	y4 = y2
	print(x3, y3, x4, y4)
else:
	print(-1)


(x1, y1, x2, y2) = list(map(int, input().split()))
if x1 == x2:
	kc = abs(y1 - y2)
	print(x1 + kc, y1, x2 + kc, y2)
elif y1 == y2:
	kc = abs(x1 - x2)
	print(x1, y1 + kc, x2, y2 + kc)
elif abs(x1 - x2) == abs(y1 - y2):
	print(x1, y2, x2, y1)
else:
	print(-1)


from sys import stdin
k = list(map(int, stdin.readline().split()))
(x1, y1, x2, y2) = (k[0], k[1], k[2], k[3])
if True == True:
	if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
		print(-1)
	elif x1 == x2:
		print(str(x1 + abs(y1 - y2)) + ' ' + str(y1) + ' ' + str(x2 + abs(y1 - y2)) + ' ' + str(y2))
	elif y1 == y2:
		print(str(x1) + ' ' + str(y1 + abs(x1 - x2)) + ' ' + str(x2) + ' ' + str(y2 + abs(x1 - x2)))
	else:
		print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))


def check_square(x1, y1, x2, y2):
	x = abs(x1 - x2)
	y = abs(y1 - y2)
	if x != y:
		return False
	return True

def parallel(x1, y1, x2, y2):
	if x1 - x2 == 0 or y1 - y2 == 0:
		return True
	return False
(x1, y1, x2, y2) = [int(x1) for x1 in input().split()]
(x3, y3, x4, y4) = (0, 0, 0, 0)
if parallel(x1, y1, x2, y2) == False:
	if check_square(x1, y1, x2, y2) == False:
		print(-1)
		exit()
	else:
		x3 = x1
		y3 = y2
		x4 = x2
		y4 = y1
		print(x3, y3, x4, y4)
else:
	if x1 == x2:
		tmp = abs(y1 - y2)
		x3 = x1 + tmp
		x4 = x2 + tmp
		y3 = y1
		y4 = y2
	else:
		tmp = abs(x1 - x2)
		x3 = x1
		x4 = x2
		y3 = y1 + tmp
		y4 = y2 + tmp
	print(x3, y3, x4, y4)


(x0, y0, x1, y1) = map(int, input().split())
if x0 == x1:
	d = y1 - y0
	print(x0 + d, y0, x1 + d, y1)
elif y0 == y1:
	d = x1 - x0
	print(x0, y0 + d, x1, y1 + d)
elif abs(x1 - x0) == abs(y1 - y0):
	print(x0, y1, x1, y0)
else:
	print(-1)


string = input()
numbers = string.split(' ')
x1 = int(numbers[0])
y1 = int(numbers[1])
x2 = int(numbers[2])
y2 = int(numbers[3])
numbers = []
if x1 == x2:
	newx = x1 + y2 - y1
	numbers.append(newx)
	numbers.append(y1)
	numbers.append(newx)
	numbers.append(y2)
elif y1 == y2:
	newy = y1 + x2 - x1
	numbers.append(x1)
	numbers.append(newy)
	numbers.append(x2)
	numbers.append(newy)
elif x2 - x1 == y2 - y1 or x1 - x2 == y2 - y1:
	numbers.append(x2)
	numbers.append(y1)
	numbers.append(x1)
	numbers.append(y2)
else:
	numbers = [-1, '', '', '']
for x in range(4):
	numbers[x] = str(numbers[x])
print(' '.join(numbers))


(x1, y1, x2, y2) = map(int, input().split())
isSquare = True
if x1 == x2:
	side = abs(y1 - y2)
	x3 = x1 + side
	y3 = y1
	x4 = x2 + side
	y4 = y2
elif y1 == y2:
	side = abs(x1 - x2)
	x3 = x1
	y3 = y1 + side
	x4 = x2
	y4 = y2 + side
elif abs(x1 - x2) != abs(y1 - y2):
	isSquare = False
else:
	side = abs(x1 - x2)
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
if isSquare:
	print(x3, y3, x4, y4)
else:
	print(-1)


a = list(map(int, input().split()))
s = set(a)
(x1, y1, x2, y2) = a
lx = abs(x2 - x1)
ly = abs(y2 - y1)
if lx != ly and lx != 0 and (ly != 0):
	print(-1)
else:
	length = max(lx, ly)
	x = min(x1, x2)
	y = min(y1, y2)
	res = []
	for i in [x, x + length]:
		for j in [y, y + length]:
			if i == x1 and j == y1 or (i == x2 and j == y2):
				continue
			res += [i, j]
	print(*res)


(x1, y1, x2, y2) = map(int, input().split())
DifX = abs(x2 - x1)
DifY = abs(y2 - y1)
if y1 == y2 and x1 != x2:
	(x3, x4) = (x1, x2)
	(y3, y4) = (y1 + DifX, y2 + DifX)
	print(x3, y3, x4, y4)
elif x1 == x2 and y1 != y2:
	(x3, x4) = (x1 + DifY, x2 + DifY)
	(y3, y4) = (y1, y2)
	print(x3, y3, x4, y4)
elif DifX == DifY and x1 != x2 and (y1 != y2):
	(x3, x4) = (x1, x2)
	(y3, y4) = (y2, y1)
	print(x3, y3, x4, y4)
else:
	print(-1)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	(x1, y1, x2, y2) = LI()
	if x1 == x2:
		sa = abs(y1 - y2)
		return '{} {} {} {}'.format(x1 + sa, y1, x1 + sa, y2)
	if y1 == y2:
		sa = abs(x1 - x2)
		return '{} {} {} {}'.format(x1, y1 + sa, x2, y2 + sa)
	if abs(x1 - x2) != abs(y1 - y2):
		return -1
	return '{} {} {} {}'.format(x1, y2, x2, y1)
print(main())


def pashmak_and_garden():
	coordinates = [int(c) for c in input().split(' ')]
	(x1, y1, x2, y2) = (coordinates[0], coordinates[1], coordinates[2], coordinates[3])
	Xd = abs(x1 - x2)
	Yd = abs(y1 - y2)
	if Xd and (not Yd):
		return [x1, y1 + Xd, x2, y2 + Xd]
	elif Yd and (not Xd):
		return [x1 + Yd, y1, x2 + Yd, y2]
	elif Xd == Yd and Xd != 0:
		return [x1, y2, x2, y1]
	else:
		return [-1]
print(' '.join((str(x) for x in pashmak_and_garden())))


(x1, y1, x2, y2) = [int(x) for x in input().split()]
a = max(abs(x1 - x2), abs(y1 - y2))
(x, y) = [min(x1, x2), min(y1, y2)]
if x1 == x2:
	print(x1 + a, y1, x2 + a, y2)
elif y1 == y2:
	print(x1, y1 + a, x2, y2 + a)
elif x1 - x2 == y1 - y2:
	print(x + a, y, x, y + a)
elif x1 - x2 == y2 - y1:
	print(x + a, y + a, x, y)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	print(x1 + y2 - y1, y1, x2 + y2 - y1, y2)
elif y1 == y2:
	print(x1, y1 + x2 - x1, x2, y2 + x2 - x1)
elif ((y2 - y1) ** 2 + (x2 - x1) ** 2) / 2 == (x2 - x1) ** 2:
	print(x2, y1, x1, y2)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2 or y1 == y2:
	if x1 == x2:
		a = abs(y1 - y2)
		print(x1 + a, end=' ')
		print(y1, end=' ')
		print(x1 + a, end=' ')
		print(y2)
	else:
		a = abs(x1 - x2)
		print(x1, end=' ')
		print(y1 + a, end=' ')
		print(x2, end=' ')
		print(y2 + a, end=' ')
elif abs((y2 - y1) / (x2 - x1)) == 1.0:
	print(x2, end=' ')
	print(y1, end=' ')
	print(x1, end=' ')
	print(y2)
else:
	print(-1)


(x1, y1, x2, y2) = [int(x) for x in input().split()]
diff1 = diff2 = x3 = x4 = y3 = y4 = 0
if x1 != x2 and y1 != y2:
	diff1 = abs(x1 - x2)
	diff2 = abs(y2 - y1)
	if diff1 == diff2:
		x3 = x1
		x4 = x2
		y3 = y2
		y4 = y1
		print('%d %d %d %d' % (x3, y3, x4, y4))
	else:
		print(-1)
elif x1 == x2 and y1 != y2:
	diff = abs(y2 - y1)
	x3 = x1 + diff
	x4 = x2 + diff
	y3 = y1
	y4 = y2
	print('%d %d %d %d' % (x3, y3, x4, y4))
elif x1 != x2 and y1 == y2:
	diff = abs(x1 - x2)
	y3 = y1 + diff
	y4 = y2 + diff
	x3 = x1
	x4 = x2
	print('%d %d %d %d' % (x3, y3, x4, y4))
else:
	print('%d' % -1)


import sys
(x1, y1, x2, y2) = input().split()
x1 = int(x1)
y2 = int(y2)
y1 = int(y1)
x2 = int(x2)
d = 0
if x1 == x2:
	d = abs(y1 - y2)
	print(x2 + d, y2, x2 + d, y1)
	sys.exit(0)
if y1 == y2:
	d = abs(x1 - x2)
	print(x2, y2 + d, x1, y2 + d)
	sys.exit(0)
if abs(x2 - x1) == abs(y2 - y1):
	if x2 > x1 and y2 > y1 or (x1 > x2 and y1 > y2):
		print(min(x1, x2), max(y1, y2), max(x2, x1), min(y1, y2))
		sys.exit(0)
	if x2 > x1 and y2 < y1 or (x1 > x2 and y1 < y2):
		print(max(x1, x2), max(y1, y2), min(x1, x2), min(y1, y2))
		sys.exit(0)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
a = y2 - y1
b = x2 - x1
if a == 0:
	print(x1 + b, y1 + b, x1, y1 + b)
elif b == 0:
	print(x1 + a, y1, x1 + a, y1 + a)
elif b / a == 1 or b / a == -1:
	print(x1, y2, x2, y1)
else:
	print(-1)


(x, y, n, m) = map(int, input().split())
if x == n:
	l = y - m
	print(x + l, y, n + l, m)
elif y == m:
	l = x - n
	print(x, y + l, n, m + l)
else:
	a = abs(x - n)
	b = abs(y - m)
	if a == b:
		if y < m:
			print(x, y + a, n, m - a)
		else:
			print(x, y - a, n, m + a)
	else:
		print(-1)


a = list(map(int, input().split()))
x1 = a[0]
y1 = a[1]
x2 = a[2]
y2 = a[3]
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
elif x1 == x2:
	side = abs(y1 - y2)
	print(x1 + side, y1, x2 + side, y2)
elif y1 == y2:
	side = abs(x1 - x2)
	print(x1, y1 + side, x2, y2 + side)
else:
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = map(int, input().split())
a = abs(x2 - x1)
b = abs(y2 - y1)
g = (a * a + b * b) ** 0.5
if a == 0 or b == 0:
	g = (a * a + b * b) ** 0.5
	if a == 0:
		x3 = x1 + g
		x4 = x2 + g
		y3 = y1
		y4 = y2
	elif b == 0:
		y3 = y1 + g
		y4 = y2 + g
		x3 = x1
		x4 = x2
	print(round(x3), round(y3), round(x4), round(y4))
elif a == b:
	y3 = y2
	x3 = x1
	y4 = y1
	x4 = x2
	print(round(x3), round(y3), round(x4), round(y4))
else:
	print('-1')


inp = input().split()
x1 = int(inp[0])
y1 = int(inp[1])
x2 = int(inp[2])
y2 = int(inp[3])
len1 = abs(x1 - x2)
len2 = abs(y1 - y2)
if len1 == 0:
	print('{0} {1} {2} {3}'.format(x1 + len2, y1, x2 + len2, y2))
	exit()
if len2 == 0:
	print('{0} {1} {2} {3}'.format(x1, y1 + len1, x2, y2 + len1))
	exit()
if len1 != len2:
	print(-1)
	exit()
print('{0} {1} {2} {3}'.format(x1, y2, x2, y1))


(x1, y1, x2, y2) = [int(i) for i in input().split()]
if x1 == x2:
	(x1, y1, x2, y2) = (min(x1, x2), min(y1, y2), max(x1, x2), max(y1, y2))
	dist = y2 - y1
	x3 = x1 + dist
	y3 = y1
	x4 = x2 + dist
	y4 = y2
	if x3 > 1000:
		x3 -= 2 * dist
		x4 -= 2 * dist
	print(x3, y3, x4, y4)
elif y1 == y2:
	(x1, y1, x2, y2) = (min(x1, x2), min(y1, y2), max(x1, x2), max(y1, y2))
	dist = x2 - x1
	y3 = y1 + dist
	x3 = x1
	y4 = y2 + dist
	x4 = x2
	if y3 > 1000:
		y3 -= 2 * dist
		y4 -= 2 * dist
	print(x3, y3, x4, y4)
else:
	dx = max(x1, x2) - min(x1, x2)
	dy = max(y1, y2) - min(y1, y2)
	if dx != dy:
		print(-1)
	else:
		print(x1, y2, x2, y1)


text_input = input()
input_splitted = text_input.split(' ')
first_tree_x = int(input_splitted[0])
first_tree_y = int(input_splitted[1])
second_tree_x = int(input_splitted[2])
second_tree_y = int(input_splitted[3])
if first_tree_x == second_tree_x:
	distance = abs(first_tree_y - second_tree_y)
	new_x = first_tree_x + distance
	print(str(new_x) + ' ' + str(first_tree_y) + ' ' + str(new_x) + ' ' + str(second_tree_y))
elif first_tree_y == second_tree_y:
	distance = abs(first_tree_x - second_tree_x)
	new_y = first_tree_y + distance
	print(str(first_tree_x) + ' ' + str(new_y) + ' ' + str(second_tree_x) + ' ' + str(new_y))
else:
	distance_1 = abs(first_tree_x - second_tree_x)
	distance_2 = abs(first_tree_y - second_tree_y)
	if distance_1 != distance_2:
		print(-1)
	elif first_tree_x < second_tree_x:
		print(str(first_tree_x) + ' ' + str(second_tree_y) + ' ' + str(second_tree_x) + ' ' + str(first_tree_y))
	else:
		print(str(second_tree_x) + ' ' + str(first_tree_y) + ' ' + str(first_tree_x) + ' ' + str(second_tree_y))


(a, b, c, d) = map(int, input().split())
x = abs(a - c)
y = abs(b - d)
if a == c:
	print(a + y, b, c + y, d)
elif b == d:
	print(a, b + x, c, d + x)
elif x == y:
	print(c, b, a, d)
else:
	print('-1')


A = [int(x) for x in input().split()]
if A[0] == A[2]:
	a = A[3] - A[1]
	print(A[0] + a, A[1], A[2] + a, A[3])
elif A[1] == A[3]:
	a = A[2] - A[0]
	print(A[0], A[1] + a, A[2], A[3] + a)
elif abs(A[2] - A[0]) == abs(A[3] - A[1]):
	print(A[0], A[3], A[2], A[1])
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
lx = abs(x1 - x2)
ly = abs(y1 - y2)
if x1 == x2:
	print(ly + x1, y1, ly + x2, y2)
elif y1 == y2:
	length = abs(x1 - x2)
	print(x1, lx + y1, x2, lx + y2)
elif lx == ly:
	print(x1, y2, x2, y1)
else:
	print(-1)


trees = input()
trees = trees.split()
x1 = int(trees[0])
x2 = int(trees[2])
y1 = int(trees[1])
y2 = int(trees[3])
del_x = abs(x1 - x2)
del_y = abs(y1 - y2)
if del_x and del_y and (del_y != del_x):
	print('-1')
elif del_x == 0:
	print(f'{x1 + del_y} {y1} {x2 + del_y} {y2}')
elif del_y == 0:
	print(f'{x1} {y1 + del_x} {x2} {y2 + del_x}')
else:
	print(f'{x1} {y2} {x2} {y1}')


(x1, y1, x2, y2) = map(int, input().split())
xdif = x2 - x1
ydif = y2 - y1
if xdif == 0 and ydif == 0 or (xdif != 0 and ydif != 0 and (abs(xdif) != abs(ydif))):
	print(-1)
else:
	if xdif == 0:
		x3 = x1 + ydif
		x4 = x2 + ydif
		y3 = y1
		y4 = y2
	elif ydif == 0:
		x3 = x1
		x4 = x2
		y3 = y1 + xdif
		y4 = y2 + xdif
	else:
		x3 = x1
		y3 = y1 + ydif
		x4 = x2
		y4 = y2 - ydif
	print(x3, y3, x4, y4)


(a, b, c, d) = map(int, input().split())
if a - c != 0 and b - d != 0 and (abs(a - c) != abs(b - d)):
	print('-1')
elif b - d == 0:
	print(str(a) + ' ' + str(b + abs(c - a)) + ' ' + str(c) + ' ' + str(b + abs(c - a)))
elif a - c == 0:
	print(str(a + abs(b - d)) + ' ' + str(b) + ' ' + str(a + abs(b - d)) + ' ' + str(d))
else:
	print(str(a) + ' ' + str(d) + ' ' + str(c) + ' ' + str(b))


x1_y1_x2_y2 = input('')
x1_y1_x2_y2_list = list(x1_y1_x2_y2.split())
lis = []
for x in range(len(x1_y1_x2_y2_list)):
	lis.append(int(x1_y1_x2_y2_list[x]))
(x1, y1, x2, y2) = lis
a = abs(x1 - x2)
b = abs(y1 - y2)
if a == b:
	length = a
if a == b:
	if y1 > y2:
		print(x2, y1, x1, y2)
	elif y1 < y2:
		print(x1, y2, x2, y1)
	else:
		pass
if a == 0 or b == 0:
	if a == 0:
		print(x1 + b, y1, x2 + b, y2)
	elif b == 0:
		print(x1, y1 + a, x2, y2 + a)
	else:
		pass
if a != 0 and b != 0 and (a != b):
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
ax = abs(x2 - x1)
ay = abs(y2 - y1)
if not ax and ay:
	x1 += ay
	x2 += ay
	print(x1, y1, x2, y2)
elif ax and (not ay):
	y1 += ax
	y2 += ax
	print(x1, y1, x2, y2)
elif ax == ay:
	print(x1, y2, x2, y1)
else:
	print(-1)


(x1, y1, x2, y2) = list(map(int, input().split()))
l1 = abs(x1 - x2)
l2 = abs(y1 - y2)
if x1 == x2:
	x3 = x1 + l2
	y3 = y1
	x4 = x2 + l2
	y4 = y2
	print(x3, y3, x4, y4)
elif y1 == y2:
	x3 = x1
	y3 = y1 + l1
	x4 = x2
	y4 = y2 + l1
	print(x3, y3, x4, y4)
elif l1 != l2:
	print(-1)
else:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	print(x3, y3, x4, y4)


lst = list(map(int, input().split()))
x1 = lst[0]
y1 = lst[1]
x2 = lst[2]
y2 = lst[3]
import math
if x1 == x2:
	print(x1 + (y1 - y2), y1, x2 + (y1 - y2), y2)
	exit()
if y1 == y2:
	print(x1, y1 + (x1 - x2), x2, y2 + (x1 - x2))
	exit()
if math.fabs(x1 - x2) == math.fabs(y1 - y2):
	print(x1, y2, x2, y1)
	exit()
print(-1)


line = input()
line = line.split()
x1 = int(line[0])
y1 = int(line[1])
x2 = int(line[2])
y2 = int(line[3])
delx = x2 - x1
dely = y2 - y1
flag = 0
x3 = 0
x4 = 0
y3 = 0
y4 = 0
if delx == 0:
	delx = dely
	x3 = x1 + delx
	x4 = x1 + delx
	y3 = y2
	y4 = y1
elif dely == 0:
	dely = delx
	y3 = y1 + dely
	y4 = y1 + dely
	x3 = x2
	x4 = x1
else:
	nx = delx
	ny = dely
	if delx < 0:
		nx = nx * -1
	if dely < 0:
		ny = ny * -1
	if ny != nx:
		flag = 1
	else:
		x3 = x1
		y3 = y2
		x4 = x2
		y4 = y1
if flag == 1:
	print(-1)
else:
	print(str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4))


trees = [int(i) for i in input().split()]
if trees[1] == trees[3]:
	t = trees[1] + abs(trees[2] - trees[0])
	print(str(trees[0]) + ' ' + str(t) + ' ' + str(trees[2]) + ' ' + str(t))
elif trees[0] == trees[2]:
	t = trees[0] + abs(trees[3] - trees[1])
	print(str(t) + ' ' + str(trees[1]) + ' ' + str(t) + ' ' + str(trees[3]))
elif abs(trees[0] - trees[2]) == abs(trees[1] - trees[3]):
	print(str(trees[2]) + ' ' + str(trees[1]) + ' ' + str(trees[0]) + ' ' + str(trees[3]))
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2 or y1 == y2:
	if x1 == x2:
		k = abs(y1 - y2)
		p = k + x1
		print(p, y1, p, y2)
	else:
		k = abs(x1 - x2)
		p = k + y1
		print(x1, p, x2, p)
elif abs(y2 - y1) == abs(x2 - x1):
	print(x1, y2, x2, y1)
else:
	print('-1')


import math
(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	dis = y2 - y1
	x3 = x1 + dis
	x4 = x2 + dis
	y3 = y1
	y4 = y2
elif y1 == y2:
	dis = x2 - x1
	x3 = x1
	x4 = x2
	y3 = y1 + dis
	y4 = y2 + dis
elif x1 != x2 and y1 != y2:
	if math.fabs(x2 - x1) == math.fabs(y2 - y1):
		dis = x2 - x1
		x3 = x1 + dis
		y3 = y1
		x4 = x2 - dis
		y4 = y2
	else:
		print('-1')
		exit()
print(x3, y3, x4, y4)


import itertools
import time

def timer(f):

	def tmp(*args, **kwargs):
		t = time.time()
		res = f(*args, **kwargs)
		print('Время выполнения функции: %f' % (time.time() - t))
		return res
	return tmp
(x1, y1, x2, y2) = map(int, input().split(' '))
if x1 == x2:
	side = abs(y2 - y1)
	x3 = x1 + side
	y3 = y1
	x4 = x2 + side
	y4 = y2
	print(x3, y3, x4, y4)
	exit(0)
if y1 == y2:
	side = abs(x2 - x1)
	x3 = x1
	y3 = y1 + side
	x4 = x2
	y4 = y2 + side
	print(x3, y3, x4, y4)
	exit(0)
side1 = abs(y2 - y1)
side2 = abs(x2 - x1)
if side1 == side2:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	print(x3, y3, x4, y4)
else:
	print(-1)


(a, b, c, d) = list(map(int, input().split(' ')))
if a == c:
	if b < d:
		value = d - b
		print(a + value, b, c + value, d)
	else:
		(b, d) = (d, b)
		value = d - b
		print(a + value, b, c + value, d)
elif b == d:
	(a, b) = (b, a)
	(c, d) = (d, c)
	if b < d:
		value = d - b
		print(b, a + value, d, c + value)
	else:
		(b, d) = (d, b)
		value = d - b
		print(b, a + value, d, c + value)
elif abs(c - a) == abs(d - b):
	print(a, d, c, b)
else:
	print(-1)


(x1, y1, x2, y2) = [int(i) for i in input().split()]
if x1 == x2:
	l = abs(y1 - y2)
	x3 = x1 + l if x1 + l <= 1000 else x1 - l
	x4 = x3
	y3 = y1
	y4 = y2
	print(x3, y3, x4, y4)
elif y1 == y2:
	l = abs(x1 - x2)
	y3 = y1 + l if y1 + l <= 1000 else y1 - l
	y4 = y3
	x3 = x1
	x4 = x2
	print(x3, y3, x4, y4)
elif abs(x2 - x1) == abs(y1 - y2):
	if x2 > x1:
		x3 = x1
		y3 = y2
		x4 = x2
		y4 = y1
	else:
		x3 = x2
		y3 = y1
		x4 = x1
		y4 = y2
	print(x3, y3, x4, y4)
else:
	print(-1)


a = list(map(int, input().split()))
x = abs(a[2] - a[0])
y = abs(a[3] - a[1])
if x == 0 or y == 0 or x == y:
	if x == 0:
		print(a[0] + y, a[1], a[0] + y, a[3])
	elif y == 0:
		print(a[0], a[1] + x, a[2], a[1] + x)
	else:
		print(a[0], a[3], a[2], a[1])
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	y = y2 - y1
	print(x1 + y, y1, x1 + y, y2)
elif y1 == y2:
	x = x2 - x1
	print(x1, y1 + x, x2, y2 + x)
elif abs(y2 - y1) == abs(x2 - x1):
	print(x2, y1, x1, y2)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 > x2:
	(x1, x2) = (x2, x1)
	(y1, y2) = (y2, y1)
if (x1 != x2 and y1 != y2) and x2 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
	exit(0)
elif x1 == x2:
	a = abs(y1 - y2)
	x3 = x1 + a
	x4 = x1 + a
	y3 = y1
	y4 = y2
elif y1 == y2:
	b = abs(x1 - x2)
	y3 = y1 + b
	y4 = y1 + b
	x3 = x1
	x4 = x2
else:
	x3 = x1
	x4 = x2
	y3 = y2
	y4 = y1
print(x3, y3, x4, y4)


import math
(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	print(str(x1 + y2 - y1) + ' ' + str(y1) + ' ' + str(x2 + y2 - y1) + ' ' + str(y2))
	quit()
if y1 == y2:
	print(str(x1) + ' ' + str(y1 + x2 - x1) + ' ' + str(x2) + ' ' + str(y2 + x2 - x1))
	quit()
if math.fabs(y2 - y1) == math.fabs(x2 - x1):
	print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))
	quit()
print(-1)


L = [int(x) for x in input().split()]
x1 = L[0]
y1 = L[1]
x2 = L[2]
y2 = L[3]
if x1 == x2:
	t = abs(y2 - y1)
	print(x1 + t, y1, x1 + t, y2)
elif y1 == y2:
	t = abs(x2 - x1)
	print(x1, y1 + t, x2, y1 + t)
elif abs(x1 - x2) == abs(y1 - y2):
	t = abs(x1 - x2)
	if x1 < x2 and y1 < y2:
		print(x1 + t, y1, x1, y1 + t)
	if x1 < x2 and y1 > y2:
		print(x1 + t, y1, x1, y1 - t)
	if x1 > x2 and y1 > y2:
		print(x2 + t, y2, x2, y2 + t)
	if x1 > x2 and y1 < y2:
		print(x2 + t, y2, x2, y2 - t)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	x3 = x1 + abs(y1 - y2)
	print(x3, y1, x3, y2)
elif y1 == y2:
	y3 = y1 + abs(x1 - x2)
	print(x1, y3, x2, y3)
elif abs(x1 - x2) != abs(y1 - y2):
	print(-1)
else:
	print(x1, y2, x2, y1)


ls = list(map(int, input().split()))
if (ls[0] == ls[2] or ls[1] == ls[3]) or (ls[0] == ls[1] and ls[2] == ls[3]) or abs(ls[0] - ls[2]) == abs(ls[1] - ls[3]):
	x0 = ls[0]
	y0 = ls[1]
	x1 = ls[2]
	y1 = ls[3]
	if x0 == x1:
		print(x0 + abs(y0 - y1), end=' ')
		print(y0, end=' ')
		print(x1 + abs(y0 - y1), end=' ')
		print(y1)
	elif y0 == y1:
		print(x0, end=' ')
		print(y0 + abs(x0 - x1), end=' ')
		print(x1, end=' ')
		print(y1 + abs(x0 - x1))
	else:
		print(x0, end=' ')
		print(y1, end=' ')
		print(x1, end=' ')
		print(y0)
else:
	print(-1)


s = list(map(int, input().split()))
x = (s[0], 1000, s[2])
m = x.index(min(x))
(x1, y1) = (s[m], s[m + 1])
(x2, y2) = (s[2 - m], s[2 - m + 1])
if x2 - x1 == y2 - y1:
	L = x2 - x1
	print(x1 + L, y1, x1, y1 + L)
elif x2 - x1 == y1 - y2:
	L = x2 - x1
	print(x1, y1 - L, x1 + L, y2 + L)
elif x1 == x2:
	L = y2 - y1
	print(x1 + L, y1, x1 + L, y2)
elif y1 == y2:
	L = x2 - x1
	print(x1, y1 + L, x2, y2 + L)
else:
	print(-1)


(x1, y1, x2, y2) = input().split()
x1 = int(x1)
x2 = int(x2)
y1 = int(y1)
y2 = int(y2)
if x1 == x2 and y1 == y2:
	print(-1)
elif x1 == x2 and y1 != y2:
	s = y2 - y1
	print(x2 + s, y2, x1 + s, y1)
elif x1 != x2 and y1 == y2:
	s = x2 - x1
	print(x1, y1 + s, x2, y2 + s)
elif x1 != x2 and y1 != y2:
	if y1 - y2 == x2 - x1 or y1 - y2 == x1 - x2:
		print(x1, y2, x2, y1)
	else:
		print(-1)
else:
	print(-1)


(x1, y1, x2, y2) = list(map(int, input().split()))
f = 0
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	f = 1
elif y1 == y2:
	x4 = x1
	x3 = x2
	y3 = x2 - x1 + y2
	y4 = y3
elif x1 == x2:
	y4 = y1
	y3 = y2
	x3 = x2 + y2 - y1
	x4 = x3
else:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
if f == 1:
	print('-1')
else:
	print(x3, end=' ')
	print(y3, end=' ')
	print(x4, end=' ')
	print(y4, end=' ')


a = []
a = input().split()
x1 = int(a[0])
y1 = int(a[1])
x2 = int(a[2])
y2 = int(a[3])
import math
t = (y2 - y1) * (y2 - y1) + (x2 - x1) * (x2 - x1)
d = int(math.sqrt(t))
if x1 == x2:
	y3 = str(y1)
	y4 = str(y2)
	x3 = str(x1 + d)
	x4 = str(x1 + d)
	print(x3 + ' ' + y3 + ' ' + x4 + ' ' + y4)
elif y1 == y2:
	x3 = str(x1)
	x4 = str(x2)
	y3 = str(d + y1)
	y4 = str(d + y1)
	print(x3 + ' ' + y3 + ' ' + x4 + ' ' + y4)
else:
	x3 = x1
	x4 = x2
	y3 = y2
	y4 = y1
	t = (y4 - y1) * (y4 - y1) + (x4 - x1) * (x4 - x1)
	d1 = int(math.sqrt(t))
	t = (y3 - y2) * (y3 - y2) + (x3 - x2) * (x3 - x2)
	d2 = int(math.sqrt(t))
	t = (y3 - y1) * (y3 - y1) + (x3 - x1) * (x3 - x1)
	d3 = int(math.sqrt(t))
	t = (y4 - y2) * (y4 - y2) + (x4 - x2) * (x4 - x2)
	d4 = int(math.sqrt(t))
	if d1 == d2 and d2 == d3 and (d3 == d4) and (d4 == d1):
		print(str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4))
	else:
		print('-1')


class Solution:

	def __init__(self):
		(self.x1, self.y1, self.x2, self.y2) = [int(x) for x in input().split()]

	def solve_and_print(self):
		if self.x1 == self.x2:
			print(f'{self.x1 + abs(self.y2 - self.y1)} {self.y1} {self.x2 + abs(self.y2 - self.y1)} {self.y2}')
		elif self.y1 == self.y2:
			print(f'{self.x1} {self.y1 + abs(self.x2 - self.x1)} {self.x2} {self.y2 + abs(self.x2 - self.x1)}')
		elif abs(self.y2 - self.y1) == abs(self.x2 - self.x1):
			print(f'{self.x1} {self.y2} {self.x2} {self.y1}')
		else:
			print(-1)
Solution().solve_and_print()


try:
	A = list(map(int, input().split()))
	x1 = A[0]
	y1 = A[1]
	x2 = A[2]
	y2 = A[3]
	if x1 == x2 or y1 == y2:
		if x1 == x2:
			dist = y2 - y1
			print(x1 + dist, y1, x2 + dist, y2)
		if y1 == y2:
			dist = x2 - x1
			print(x1, y1 + dist, x2, y2 + dist)
	else:
		dist1 = x1 - x2
		dist2 = y1 - y2
		if abs(dist1) == abs(dist2):
			print(x1, y2, x2, y1)
		else:
			print('-1')
except:
	pass


__author__ = '-'
points = []
stuff = input().split(' ')

def punktid(x1, y1, x2, y2):
	(x3, y3) = (0, 0)
	(x4, y4) = (0, 0)
	sihv = [x2 - x1, y2 - y1]
	if sihv[0] == 0 or sihv[1] == 0 or abs(sihv[0]) == abs(sihv[1]):
		if abs(sihv[0]) == abs(sihv[1]):
			x3 = x1
			y3 = y1 + sihv[1]
			x4 = x1 + sihv[0]
			y4 = y1
		else:
			x3 = x1 + sihv[1]
			y3 = y1 + sihv[0]
			x4 = x2 + sihv[1]
			y4 = y2 + sihv[0]
		print(str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4))
	else:
		print('-1')
punktid(int(stuff[0]), int(stuff[1]), int(stuff[2]), int(stuff[3]))


(x1, y1, x2, y2) = map(int, input().split())
(dx, dy) = (x2 - x1, y2 - y1)
if dx == 0:
	print(x1 + dy, y1, x1 + dy, y2)
elif dy == 0:
	print(x1, y1 + dx, x2, y2 + dx)
elif abs(dx) != abs(dy):
	print(-1)
else:
	print(x1, y2, x2, y1)


from math import sqrt

def main():
	(x1, y1, x2, y2) = map(int, input().split())
	if x1 == x2:
		distance = int(dist(x1, y1, x2, y2))
		print(f'{x1 + distance} {y1} {x2 + distance} {y2}')
		return
	elif y1 == y2:
		distance = int(dist(x1, y1, x2, y2))
		print(f'{x1} {y1 + distance} {x2} {y2 + distance}')
		return
	if can_mismatch(x1, y1, x2, y2):
		print(f'{x1} {y2} {x2} {y1}')
		return
	print(-1)

def can_mismatch(x1, y1, x2, y2):
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	return int(dist(x1, y1, x3, y3)) == int(dist(x1, y1, x4, y4)) == int(dist(x2, y2, x3, y3)) == int(dist(x2, y2, x4, y4))

def dist(x1, y1, x2, y2):
	return sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
main()


b = [int(b) for b in input().split()]
x1 = b[0]
y1 = b[1]
x2 = b[2]
y2 = b[3]

def pos(a, b):
	if a >= b:
		return a - b
	else:
		return b - a
if x1 == x2:
	x3 = x1 + pos(y2, y1)
	y3 = y1
	x4 = x3
	y4 = y2
	print(x3, y3, x4, y4)
if y1 == y2:
	y3 = y1 + pos(x2, x1)
	y4 = y3
	x3 = x1
	x4 = x2
	print(x3, y3, x4, y4)
if x1 != x2 and y1 != y2:
	if pos(x2, x1) == pos(y2, y1):
		if x1 > x2:
			x3 = x1 - pos(x1, x2)
			y3 = y1
			x4 = x2 + pos(x1, x2)
			y4 = y2
		else:
			x3 = x2 - pos(x1, x2)
			y3 = y2
			x4 = x1 + pos(x1, x2)
			y4 = y1
		print(x3, y3, x4, y4)
	else:
		print(-1)


(x1, y1, x2, y2) = [int(i) for i in input().split()]
x_diff = abs(x1 - x2)
y_diff = abs(y1 - y2)
if x_diff != 0 and y_diff != 0:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
elif x_diff != 0:
	x3 = x1
	y3 = y1 + abs(x_diff)
	x4 = x2
	y4 = y2 + abs(x_diff)
else:
	x3 = x1 + abs(y_diff)
	y3 = y1
	x4 = x2 + abs(y_diff)
	y4 = y2
if x_diff != 0 and y_diff != 0 and (x_diff != y_diff):
	print('-1')
else:
	print(x3, y3, x4, y4)


(x1, y1, x2, y2) = map(int, input().split())
w = abs(x2 - x1)
h = abs(y2 - y1)
if w == 0:
	print(x1 + h, y1, x2 + h, y2)
elif h == 0:
	print(x1, y1 + w, x2, y2 + w)
elif w == h:
	print(x2, y1, x1, y2)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
if abs(x2 - x1) == abs(y2 - y1):
	print(x1, y2, x2, y1)
elif abs(y2 - y1) == 0:
	print(max(x2, x1), abs(x2 - x1) + y1, min(x2, x1), abs(x2 - x1) + y1)
elif abs(x2 - x1) == 0:
	print(abs(y2 - y1) + x1, min(y2, y1), abs(y2 - y1) + x1, max(y2, y1))
else:
	print(-1)


(a, b, c, d) = map(int, input().split())
if abs(c - a) != abs(d - b) and a != c and (b != d):
	print(-1)
elif a != c and b != d:
	print(a, d, c, b)
elif a == c:
	print(a + d - b, b, c + d - b, d)
elif b == d:
	print(a, c - a + b, c, c - a + b)


(x1, y1, x2, y2) = input().split(' ')
x1 = int(x1)
x2 = int(x2)
y1 = int(y1)
y2 = int(y2)
dif_x = abs(x2 - x1)
dif_y = abs(y2 - y1)
dif = max(dif_x, dif_y)
if dif_x is 0:
	x3 = x1 + dif
	y3 = y1
	x4 = x2 + dif
	y4 = y2
	print(x3, y3, x4, y4)
	exit()
elif dif_y is 0:
	x3 = x1
	y3 = y1 + dif
	x4 = x2
	y4 = y2 + dif
	print(x3, y3, x4, y4)
	exit()
elif dif_x != dif_y:
	print(-1)
	exit()
else:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	print(x3, y3, x4, y4)
	exit()


(x1, y1, x2, y2) = map(int, input().split())
if y1 > y2:
	q = y1 - y2
else:
	q = y2 - y1
if x1 > x2:
	h = x1 - x2
else:
	h = x2 - x1
if y1 == y2:
	print(x1, y1 + h, x2, y2 + h)
elif x1 == x2:
	print(x1 + q, y1, x2 + q, y2)
elif h != q:
	print(-1)
else:
	print(x1, y2, x2, y1)


(x, y, p, q) = map(int, input().split())
if x == p or y == q:
	if x == p:
		l = abs(q - y)
		if x + l in range(-1000, 1000):
			print(x + l, y, p + l, q)
			exit(0)
		elif x - l in range(-1000, 1000):
			print(x - l, y, p - l, q)
			exit(0)
	else:
		l = abs(p - x)
		if y + l in range(-1000, 1000):
			print(x, y + l, p, q + l)
			exit(0)
		elif y - l in range(-1000, 1000):
			print(x, y - l, p, q - l)
			exit(0)
elif abs(p - x) == abs(q - y):
	print(x, q, p, y)
	exit(0)
print(-1)


(x1, y1, x2, y2) = map(int, input().split())
arr = [x1, y1, x2, y2]
s = set(arr)
if len(s) == 1:
	print('-1')
elif x1 == x2:
	print(str(x1 + abs(y2 - y1)) + ' ' + str(y1) + ' ' + str(x1 + abs(y2 - y1)) + ' ' + str(y2))
elif y1 == y2:
	print(str(x1) + ' ' + str(y1 + abs(x2 - x1)) + ' ' + str(x2) + ' ' + str(y1 + abs(x2 - x1)))
elif abs(y2 - y1) == abs(x2 - x1):
	print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))
else:
	print('-1')


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	n = abs(y2 - y1)
	print(x1 + n, y1, x2 + n, y2)
elif y1 == y2:
	n = abs(x2 - x1)
	print(x1, y1 + n, x2, y2 + n)
else:
	n1 = abs(x2 - x1)
	n2 = abs(y2 - y1)
	if n1 != n2:
		print(-1)
	elif x2 > x1 and y2 > y1:
		print(x1, y1 + n1, x1 + n1, y1)
	elif y2 < y1 and x2 < x1:
		print(x1, y1 - n1, x1 - n1, y1)
	elif x2 < x1 and y1 < y2:
		print(x2 + n1, y2, x2, y2 - n1)
	else:
		print(x1 + n1, y1, x1, y1 - n1)


from sys import stdin, stdout
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))

def chars():
	s = cin()
	return list(s[:len(s) - 1])

def pl(a):
	for val in a:
		cout(str(val) + ' ')
	cout('\n')
(x1, y1, x2, y2) = mp()
if x1 == x2:
	cout(str(x1 + abs(y1 - y2)) + ' ' + str(y1) + ' ' + str(x2 + abs(y1 - y2)) + ' ' + str(y2))
elif y1 == y2:
	cout(str(x1) + ' ' + str(y1 + abs(x1 - x2)) + ' ' + str(x2) + ' ' + str(y2 + abs(x1 - x2)))
elif x1 - y1 == x2 - y2:
	if x1 > x2:
		cout(str(x1) + ' ' + str(y1 - abs(x1 - x2)) + ' ' + str(x2) + ' ' + str(y2 + abs(x1 - x2)))
	else:
		cout(str(x1) + ' ' + str(y1 + abs(x1 - x2)) + ' ' + str(x2) + ' ' + str(y2 - abs(x1 - x2)))
elif x1 - x2 == y2 - y1:
	if x1 > x2:
		cout(str(x1) + ' ' + str(y1 + abs(x1 - x2)) + ' ' + str(x2) + ' ' + str(y2 - abs(x1 - x2)))
	else:
		cout(str(x1) + ' ' + str(y1 - abs(x1 - x2)) + ' ' + str(x2) + ' ' + str(y2 + abs(x1 - x2)))
else:
	cout('-1')


import math
(x1, y1, x2, y2) = [int(x) for x in input().split()]
x3 = 0
y3 = 0
x4 = 0
y4 = 0
if x1 == x2:
	side = math.fabs(y2 - y1)
	x3 = x1 + side
	x4 = x3
	y3 = y1
	y4 = y2
	print(int(x3), int(y3), int(x4), int(y4))
elif y1 == y2:
	side = math.fabs(x1 - x2)
	y3 = y1 + side
	y4 = y3
	x3 = x1
	x4 = x2
	print(int(x3), int(y3), int(x4), int(y4))
elif math.fabs(x1 - x2) == math.fabs(y1 - y2):
	if y1 < y2:
		x3 = x2
		y3 = y1
		x4 = x1
		y4 = y2
	else:
		x4 = x1
		y4 = y2
		x3 = x2
		y3 = y1
	print(int(x3), int(y3), int(x4), int(y4))
else:
	print(-1)


def main():
	(x1, y1, x2, y2) = read()
	if x1 == x2:
		write([x1 + y2 - y1, y1, x2 + y2 - y1, y2])
		return
	if y1 == y2:
		write([x1, y1 + x2 - x1, x2, y2 + x2 - x1])
		return
	if x2 - x1 == y2 - y1 or x2 - x1 == y1 - y2:
		write([x2, y1, x1, y2])
		return
	print(-1)

def read(mode=2):
	inputs = input().strip()
	if mode == 0:
		return inputs
	if mode == 1:
		return inputs.split()
	if mode == 2:
		return map(int, inputs.split())

def write(s='\n'):
	if s is None:
		s = ''
	if isinstance(s, list):
		s = ' '.join(map(str, s))
	s = str(s)
	print(s, end='')
write(main())


(ax, ay, bx, by) = map(int, input().split())
bx -= ax
by -= ay
t = 0
if bx == 0:
	if by:
		t = (ax + by, ay + by, ax + by, ay)
elif by == 0:
	t = (ax, ay + bx, ax + bx, ay + bx)
elif abs(bx) == abs(by):
	t = (ax + bx, ay, ax, ay + by)
print(' '.join(map(str, t)) if t else -1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 != x2 and y1 != y2:
	if abs(x2 - x1) == abs(y2 - y1):
		print(x1, y2, x2, y1)
	else:
		print(-1)
elif x1 == x2:
	if x1 + abs(y2 - y1) <= 1000:
		other_x = x1 + abs(y2 - y1)
		print(other_x, y1, other_x, y2)
	elif x1 - abs(y2 - y1) <= 1000:
		other_x = x1 - abs(y2 - y1)
		print(other_x, y1, other_x, y2)
	else:
		print(-1)
elif y1 + abs(x2 - x1) <= 1000:
	y = y1 + abs(x2 - x1)
	print(x1, y, x2, y)
elif y1 - abs(x2 - x1) <= 1000:
	y = y1 - abs(x2 - x1)
	print(x1, y, x2, y)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
x_size = abs(x1 - x2)
y_size = abs(y1 - y2)
if x_size == 0 and y_size == 0:
	print(-1)
elif x_size != 0 and y_size != 0 and (x_size != y_size):
	print(-1)
elif x_size > 0 and y_size > 0:
	print(x1, y2, x2, y1)
elif y_size > 0:
	assert x_size == 0
	assert x1 == x2
	print(x1 + y_size, y1, x1 + y_size, y2)
else:
	assert y_size == 0
	assert y1 == y2
	print(x1, y1 + x_size, x2, y1 + x_size)


(x1, y1, x2, y2) = input().split()
(x1, y1, x2, y2) = [int(x1), int(y1), int(x2), int(y2)]
s1 = abs(x2 - x1)
s2 = abs(y2 - y1)
if s1 != s2 and s1 != 0 and (s2 != 0):
	print('-1')
elif x1 == x2:
	print(s2 + x1, y1, s2 + x2, y2)
elif y1 == y2:
	print(x1, s1 + y1, x2, s1 + y2)
else:
	print(x1, y2, x2, y1)


(a, b, c, d) = list(map(int, input().split()))
e = abs(b - d)
f = abs(a - c)
if a == c:
	e = abs(b - d)
	print(a + e, b, c + e, d)
elif b == d:
	print(a, b + f, c, d + f)
elif e != f:
	print(-1)
else:
	print(a, d, c, b)


from math import *
(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	d = abs(y2 - y1)
	(x3, x4) = (x1 + d, x1 + d)
	print(x3, y1, x4, y2)
elif y1 == y2:
	d = abs(x2 - x1)
	(y3, y4) = (y1 + d, y1 + d)
	print(x1, y3, x2, y4)
else:
	d1 = abs(x2 - x1)
	d2 = abs(y2 - y1)
	if d1 == d2:
		print(x1, y2, x2, y1)
	else:
		print(-1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 - x2 == 0:
	print(str(x1 + abs(y2 - y1)) + ' ' + str(y1) + ' ' + str(x1 + abs(y2 - y1)) + ' ' + str(y2))
elif y1 - y2 == 0:
	print(str(x1) + ' ' + str(y1 + abs(x2 - x1)) + ' ' + str(x2) + ' ' + str(y1 + abs(x2 - x1)))
elif abs(x2 - x1) == abs(y2 - y1):
	print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
run = x2 - x1
rise = y2 - y1
if run == 0:
	print(x1 + rise, y1, x1 + rise, y2)
elif rise == 0:
	print(x1, y1 + run, x2, y2 + run)
elif abs(rise) != abs(run):
	print(-1)
else:
	print(x1, y2, x2, y1)


import math
datos = input().split()
(x1, y1, x2, y2) = (int(datos[0]), int(datos[1]), int(datos[2]), int(datos[3]))
largo = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
if y1 == y2:
	largo = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
	if y1 + largo > 1000:
		(x3, x4) = (x1, x2)
		(y3, y4) = (y1 - largo, y2 - largo)
		print(str(int(x3)) + ' ' + str(int(y3)) + ' ' + str(int(x4)) + ' ' + str(int(y4)))
	else:
		(x3, x4) = (x1, x2)
		(y3, y4) = (y1 + largo, y2 + largo)
		print(str(int(x3)) + ' ' + str(int(y3)) + ' ' + str(int(x4)) + ' ' + str(int(y4)))
elif x1 == x2:
	largo = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
	if x1 + largo > 1000:
		(y3, y4) = (y1, y2)
		(x3, x4) = (x1 - largo, x2 - largo)
		print(str(int(x3)) + ' ' + str(int(y3)) + ' ' + str(int(x4)) + ' ' + str(int(y4)))
	else:
		(y3, y4) = (y1, y2)
		(x3, x4) = (x1 + largo, x2 + largo)
		print(str(int(x3)) + ' ' + str(int(y3)) + ' ' + str(int(x4)) + ' ' + str(int(y4)))
elif math.sqrt((x1 - x2) ** 2) == math.sqrt((y1 - y2) ** 2):
	(x3, x4) = (x2, x1)
	(y3, y4) = (y1, y2)
	print(str(int(x3)) + ' ' + str(int(y3)) + ' ' + str(int(x4)) + ' ' + str(int(y4)))
else:
	print('-1')


(x1, y1, x2, y2) = [int(x) for x in input().split()]
if x1 == x2:
	b = abs(y2 - y1)
	x3 = x1 + b
	x4 = x3
	y3 = y1
	y4 = y2
	print(x3, y3, x4, y4)
if y1 == y2:
	b = abs(x2 - x1)
	y3 = y1 + b
	y4 = y3
	x4 = x2
	x3 = x1
	print(x3, y3, x4, y4)
if x1 != x2 and y1 != y2:
	b = abs(x2 - x1)
	a = abs(y2 - y1)
	if a == b:
		x3 = x1
		x4 = x2
		y3 = y2
		y4 = y1
		print(x3, y3, x4, y4)
	else:
		print('-1')


(x1, y1, x2, y2) = [int(x) for x in input().split()]
if x1 == x2:
	dif = abs(y1 - y2)
	print(x1 + dif, y1)
	print(x2 + dif, y2)
elif y1 == y2:
	dif = abs(x1 - x2)
	print(x1, y1 + dif)
	print(x2, y2 + dif)
elif abs(x1 - x2) == abs(y1 - y2):
	print(x1, y2)
	print(x2, y1)
else:
	print(-1)


import sys
import heapq
from collections import deque
from collections import defaultdict
I = lambda : list(map(int, input().split(' ')))
(x1, y1, x2, y2) = I()
ll = sorted([(x1, y1), (x2, y2)])
(x1, y1, x2, y2) = (ll[0][0], ll[0][1], ll[1][0], ll[1][1])

def check(x):
	if x <= 1000 and x >= -1000:
		return True
	else:
		return False
ans = None
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	()
elif x1 != x2 and y1 != y2:
	ss = max(abs(x1 - x2), abs(y1 - y2))
	ans = [x1, y2, x2, y1]
elif x1 == x2 and y1 != y2:
	ss = abs(y2 - y1)
	if check(x1 + ss):
		ans = [x1 + ss, y1, x2 + ss, y2]
	elif check(x1 - ss):
		ans = [x1 - ss, y1, x2 - ss, y2]
elif x1 != x2 and y1 == y2:
	ss = abs(x2 - x1)
	if check(y1 + ss):
		ans = [x1, y1 + ss, x2, y2 + ss]
	elif check(x1 - ss):
		ans = [x1, y1 - ss, x2, y2 - ss]
if ans:
	print(' '.join(map(str, ans)))
else:
	print(-1)


(x1, y1, x2, y2) = input().split()
x1 = int(x1)
y1 = int(y1)
x2 = int(x2)
y2 = int(y2)
status = True
if x1 == x2:
	y3 = y2
	y4 = y1
	if x1 > 0:
		x3 = x1 - abs(y1 - y2)
		x4 = x3
	else:
		x3 = x1 + abs(y1 - y2)
		x4 = x3
elif y1 == y2:
	x3 = x2
	x4 = x1
	if y1 > 0:
		y3 = y1 - abs(x1 - x2)
		y4 = y3
	else:
		y3 = y1 + abs(x1 - x2)
		y4 = y3
elif abs(x1 - x2) == abs(y1 - y2):
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
else:
	status = False
if status:
	print(str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4))
else:
	print(-1)


import os
import sys
from math import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def array():
	return [int(i) for i in input().split()]
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(x1, y1, x2, y2) = map(int, input().split())
try:
	slope = abs((y2 - y1) / (x2 - x1))
except:
	x = x1 + abs(y2 - y1)
	print(x, y1, x, y2)
	exit()
if slope == 0:
	y = y1 + abs(x2 - x1)
	print(x1, y, x2, y)
elif slope == 1:
	print(x1, y2, x2, y1)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
diff = abs(x2 - x1)
diff1 = abs(y2 - y1)
if x1 != x2 and y1 != y2 and (abs(x2 - x1) != abs(y2 - y1)):
	print(-1)
elif abs(y2 - y1) == 0:
	print(x1, y1 + diff, x2, y2 + diff)
elif abs(x2 - x1) == 0:
	print(x1 + diff1, y1, x2 + diff1, y2)
else:
	print(x1, y2, x2, y1)


import math
(x1, y1, x2, y2) = [int(i) for i in input().split()]
if x1 != x2 and y1 != y2:
	if abs(x1 - x2) == abs(y1 - y2):
		print(x1, y2, x2, y1)
	else:
		print(-1)
elif x1 == x2:
	a = abs(y1 - y2)
	print(x1 + a, y1, x2 + a, y2)
elif y1 == y2:
	a = abs(x1 - x2)
	print(x1, y1 + a, x2, y1 + a)


(x1, y1, x2, y2) = list(map(int, input().split()))
if x1 == x2:
	d = abs(y2 - y1)
	print(x1 + d, y1, x2 + d, y2)
elif y1 == y2:
	d = abs(x1 - x2)
	print(x1, y1 + d, x2, y2 + d)
elif abs(x1 - x2) != abs(y1 - y2):
	print('-1')
else:
	d = abs(x1 - x2)
	if (min(x1, x2), max(y1, y2)) == (x1, y1) or (min(x1, x2), max(y1, y2)) == (x2, y2):
		print(min(x1, x2), min(y1, y2), max(x1, x2), max(y1, y2))
	else:
		print(min(x1, x2), max(y1, y2), max(x1, x2), min(y1, y2))


(x1, y1, x2, y2) = map(int, input().split())
(x3, y3, x4, y4) = [0, 0, 0, 0]
t = False
if x1 == x2:
	x3 = x1 + abs(y1 - y2)
	y3 = y1
	y4 = y2
	x4 = x3
	t = True
	print(x3, y3, x4, y4)
elif y2 == y1:
	y3 = y1 + abs(x1 - x2)
	x3 = x1
	x4 = x2
	y4 = y3
	t = True
	print(x3, y3, x4, y4)
elif abs(x1 - x2) == abs(y1 - y2):
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
	t = True
	print(x3, y3, x4, y4)
if t == False:
	print('-1')


from sys import stdin
input = lambda : stdin.readline().rstrip('\r\n')
from collections import defaultdict as vector
from collections import deque as que
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
Testcase = 1
for _ in range(Testcase):
	(x1, y1, x2, y2) = inar()
	(a1, b, c, d) = (x1, y1, x2, y2)
	(x1, x2) = (min(x1, x2), max(x1, x2))
	(y1, y2) = (min(y1, y2), max(y1, y2))
	d1 = y2 - y1
	d2 = x2 - x1
	if x2 - x1 == 0:
		x2 = d1 + x1
	if y2 - y1 == 0:
		y2 = d2 + y1
	if d1 != 0 and d2 != 0 and (abs(d1) != abs(d2)):
		print(-1)
		break
	a = [(x1, y1), (x1, y2), (x2, y1), (x2, y2)]
	while (a1, b) in a:
		a.remove((a1, b))
	while (c, d) in a:
		a.remove((c, d))
	if len(a) == 2:
		for i in a:
			print(*i, end=' ')
		print()
	else:
		print(-1)


def sq(x1, y1, x2, y2):
	if x1 == x2:
		print(x1 + abs(y1 - y2), y1, x2 + abs(y1 - y2), y2)
	elif y1 == y2:
		print(x1, y1 + abs(x1 - x2), x2, y2 + abs(x1 - x2))
	elif abs(x1 - x2) == abs(y1 - y2):
		print(x1, y2, x2, y1)
	else:
		print(-1)
from sys import stdin, stdout
(x1, y1, x2, y2) = stdin.readline().split()
sq(int(x1), int(y1), int(x2), int(y2))


(x1, y1, x2, y2) = map(int, input().split())
x = abs(x1 - x2)
y = abs(y1 - y2)
(x3, y3, x4, y4, ck) = (0, 0, 0, 0, 0)
if x == 0:
	x3 = y + x1
	y3 = y1
	x4 = x3
	y4 = y2
	ck = 1
elif y == 0:
	x3 = x1
	y3 = x + y1
	x4 = x2
	y4 = y3
	ck = 1
elif x == y:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	ck = 1
if ck == 0:
	print('-1')
else:
	print(x3, y3, x4, y4)


(x_1, y_1, x_2, y_2) = map(int, input().split())
if x_1 == x_2:
	x_1 += abs(y_1 - y_2)
	x_2 += abs(y_1 - y_2)
elif y_1 == y_2:
	y_1 += abs(x_1 - x_2)
	y_2 += abs(x_1 - x_2)
elif abs(x_1 - x_2) == abs(y_1 - y_2):
	f = y_1 < y_2
	d = abs(y_1 - y_2)
	y_1 += d if f else d * -1
	y_2 += d * -1 if f else d
else:
	print(-1)
	exit()
print(x_1, y_1, x_2, y_2)


a = list(map(int, input().split()))
a = [a[:2], a[2:]]
a.sort()
b = a[:]
if a[0][0] == a[1][0]:
	a[1] = [a[1][0] + a[1][1] - a[0][1], a[1][1]]
elif a[0][1] == a[1][1]:
	a[1] = [b[1][0], a[1][1] + a[1][0] - a[0][0]]
a += [[a[0][0], a[1][1]], [a[1][0], a[0][1]]]
m = l = a[0][0]
for i in range(4):
	if a[i][0] > m:
		m = a[i][0]
	if a[i][0] < l:
		l = a[i][0]
x = m - l
m = l = a[0][1]
for i in range(4):
	if a[i][1] > m:
		m = a[i][1]
	if a[i][1] < l:
		l = a[i][1]
if m - l != x:
	print(-1)
else:
	for i in a:
		if not i in b:
			print(*i, end=' ')


(a, b, c, d) = map(int, input().split())
r = abs(a - c if a != c else b - d)
if a - c != 0 and abs(a - c) != r or (b - d != 0 and abs(b - d) != r):
	print(-1)
elif a == c:
	print(a - r, b, c - r, d)
elif b == d:
	print(a, b - r, c, d - r)
else:
	print(a, d, c, b)


(x1, y1, x2, y2) = [int(i) for i in input().split()]
possible = True
if x1 == x2:
	l1 = x1 + y1 - y2
	l2 = x1 + y2 - y1
	if l1 < 1000 and l1 > -1000:
		x3 = l1
		x4 = l1
	elif l2 < 1000 and l2 > -1000:
		x3 = l2
		x4 = l2
	else:
		possible = False
	y3 = y1
	y4 = y2
elif y1 == y2:
	l1 = y1 + x1 - x2
	l2 = y1 + x2 - x1
	if l1 < 1000 and l1 > -1000:
		y3 = l1
		y4 = l1
	elif l2 < 1000 and l2 > -1000:
		y3 = l2
		y4 = l2
	else:
		possible = False
	x3 = x1
	x4 = x2
elif abs(x1 - x2) == abs(y1 - y2):
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
else:
	possible = False
if possible:
	print(x3, y3, x4, y4, sep=' ')
else:
	print(-1)


(x1, y1, x2, y2) = [int(i) for i in input().split()]
if x1 == x2:
	d = y1 - y2
	print(x1 + d, y1, x2 + d, y2)
elif y1 == y2:
	d = x1 - x2
	print(x1, y1 + d, x2, y2 + d)
else:
	d1 = abs(y1 - y2)
	d2 = abs(x1 - x2)
	if d1 != d2:
		print(-1)
	else:
		print(x1, y2, x2, y1)


a = list(input().split(' '))
b = [int(x) for x in a]
if b[0] == b[2]:
	print(b[0] + abs(b[3] - b[1]), b[1], b[2] + abs(b[3] - b[1]), b[3])
elif b[1] == b[3]:
	print(b[0], b[1] + abs(b[2] - b[0]), b[2], b[3] + abs(b[2] - b[0]))
elif abs(b[0] - b[2]) == abs(b[3] - b[1]):
	print(b[0], b[3], b[2], b[1])
else:
	print(-1)


(x1, y1, x2, y2) = input().split()
x1 = int(x1)
y1 = int(y1)
x2 = int(x2)
y2 = int(y2)
x3 = 0
y3 = 0
x4 = 0
y4 = 0
re = 0
if abs(x2 - x1) == abs(y2 - y1):
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
if x1 == x2:
	x3 = x1 + abs(y2 - y1)
	y3 = y1
	x4 = x2 + abs(y2 - y1)
	y4 = y2
if y1 == y2:
	y3 = y1 + abs(x2 - x1)
	x3 = x1
	y4 = y2 + abs(x2 - x1)
	x4 = x2
if x3 == 0 and y3 == 0 and (x4 == 0) and (y4 == 0):
	print(-1)
else:
	print(x3, y3, x4, y4)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2 and y1 != y2:
	diff = max(y2, y1) - min(y2, y1)
	print(x1 + diff, y1, x2 + diff, y2, sep=' ')
elif y1 == y2 and x1 != x2:
	diff = max(x2, x1) - min(x1, x2)
	print(x1, y1 + diff, x2, y2 + diff, sep=' ')
elif abs(x1 - x2) == abs(y1 - y2):
	print(x1, y2, x2, y1)
else:
	print(-1)


line = input().split()
for i in range(len(line)):
	line[i] = int(line[i])
x1 = line[0]
y1 = line[1]
x2 = line[2]
y2 = line[3]
if x1 == x2:
	x3 = x1 + y1 - y2
	x4 = x3
	y3 = y1
	y4 = y2
	print(x3, y3, x4, y4)
elif y1 == y2:
	y3 = y1 + x2 - x1
	y4 = y3
	x3 = x1
	x4 = x2
	print(x3, y3, x4, y4)
elif x1 - x2 == y1 - y2:
	x3 = x1
	x4 = x2
	y3 = y2
	y4 = y1
	print(x3, y3, x4, y4)
elif x1 - x2 == y2 - y1:
	x3 = x1
	x4 = x2
	y3 = y2
	y4 = y1
	print(x3, y3, x4, y4)
else:
	print('-1')


(x1, y1, x2, y2) = map(int, input().strip().split(' '))
if x1 == x2:
	print(x1 + max(y2, y1) - min(y2, y1), y1, x1 + max(y2, y1) - min(y2, y1), y2)
elif y1 == y2:
	print(x1, y1 + max(x2, x1) - min(x2, x1), x2, y1 + max(x2, x1) - min(x2, x1))
elif max(x1, x2) - min(x1, x2) == max(y1, y2) - min(y1, y2):
	print(x1, y2, x2, y1)
else:
	print(-1)


test_input = input()
test_input = test_input.split()
x1 = int(test_input[0])
y1 = int(test_input[1])
x2 = int(test_input[2])
y2 = int(test_input[3])
if x1 - x2 == 0:
	x3 = x1 + abs(y2 - y1)
	x4 = x2 + abs(y2 - y1)
	print(str(x3) + ' ' + str(y1) + ' ' + str(x4) + ' ' + str(y2))
elif x1 - x2 != 0 and (abs(y2 - y1) / abs(x2 - x1) == 1 or abs(float(y2 - y1)) / abs(float(x2 - x1)) == float(0)):
	if abs(float(y2 - y1)) / abs(float(x2 - x1)) == float(0):
		y3 = y1 + abs(x2 - x1)
		y4 = y2 + abs(x2 - x1)
		print(str(x1) + ' ' + str(y3) + ' ' + str(x2) + ' ' + str(y4))
	if abs(y2 - y1) / abs(x2 - x1) == 1:
		x3 = x1
		y3 = y2
		x4 = x2
		y4 = y1
		print(str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4))
else:
	print(str(-1))


(x1, y1, x2, y2) = [int(x) for x in input().split()]
(vx, vy) = (x2 - x1, y2 - y1)
if abs(vx) != abs(vy) and vx != 0 and (vy != 0):
	print(-1)
else:
	if vx != 0 and vy != 0:
		(x3, y3, x4, y4) = (x1 + vx, y1, x1, y1 + vy)
	elif x1 == x2:
		(x3, y3, x4, y4) = (x1 + abs(vy), y1, x2 + abs(vy), y2)
	elif y1 == y2:
		(x3, y3, x4, y4) = (x1, y1 + abs(vx), x2, y2 + abs(vx))
	print(str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4))


from sys import stdin, stdout
cordinates = list(map(int, stdin.readline().split()))
x1 = cordinates[0]
y1 = cordinates[1]
x2 = cordinates[2]
y2 = cordinates[3]
result = False
if x1 == x2:
	side = abs(y1 - y2)
	cordinates = [x1 + side, y1, x2 + side, y2]
	result = True
elif y1 == y2:
	side = abs(x1 - x2)
	cordinates = [x1, y1 + side, x2, y2 + side]
	result = True
elif abs(x2 - x1) == abs(y2 - y1):
	side = abs(x2 - x1)
	cordinates = [x1, y2, x2, y1]
	result = True
elif abs(x2 - x1) != abs(y2 - y1):
	stdout.write('-1')
if result:
	cordinates = list(map(str, cordinates))
	stdout.write(' '.join(cordinates))


l = input().split()
x1 = int(l[0])
y1 = int(l[1])
x2 = int(l[2])
y2 = int(l[3])
if y1 == y2:
	print(x1, y1 + x2 - x1, x2, y2 + x2 - x1)
elif x1 == x2:
	print(x1 + y2 - y1, y1, x2 + y2 - y1, y2)
elif abs(x2 - x1) == abs(y1 - y2):
	print(x1, y2, x2, y1)
else:
	print(-1)


a = list(map(int, input().split()))
if abs(a[0] - a[2]) != abs(a[1] - a[3]) and min(abs(a[0] - a[2]), abs(a[1] - a[3])) != 0:
	print(-1)
elif abs(a[0] - a[2]) != 0 and abs(a[1] - a[3]) != 0:
	print(a[0], a[3], a[2], a[1])
elif abs(a[0] - a[2]) != 0 and abs(a[1] - a[3]) == 0:
	print(a[0], a[1] + abs(a[0] - a[2]), a[2], a[3] + abs(a[0] - a[2]))
else:
	print(a[0] + abs(a[1] - a[3]), a[1], a[2] + abs(a[1] - a[3]), a[3])


ip = input()
ip = ip.split(' ')
x1 = int(ip[0])
y1 = int(ip[1])
x2 = int(ip[2])
y2 = int(ip[3])
possible = True
if x1 == x2 and y1 != y2:
	s = y2 - y1
	x3 = x1 + s
	y3 = y1
	x4 = x2 + s
	y4 = y2
elif x1 != x2 and y1 == y2:
	s = x2 - x1
	y3 = y1 + s
	x3 = x1
	y4 = y2 + s
	x4 = x2
else:
	m = (y2 - y1) / (x2 - x1)
	if m == 1 or m == -1:
		x3 = x1
		y3 = y2
		x4 = x2
		y4 = y1
	else:
		possible = False
		print(-1)
if possible == True:
	print(f'{x3} {y3} {x4} {y4}')


nn = list(map(int, input().rstrip().split()))
x1 = nn[0]
y1 = nn[1]
x2 = nn[2]
y2 = nn[3]
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
elif x1 == x2:
	print(x1 + abs(y1 - y2), y1, x2 + abs(y1 - y2), y2)
elif y1 == y2:
	print(x1, y1 + abs(x1 - x2), x2, y2 + abs(x1 - x2))
else:
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	m = abs(y2 - y1)
	x3 = x1 + m
	x4 = x3
	y3 = y2
	y4 = y1
	l = [x3, y3, x4, y4]
	l = list(map(str, l))
	print(' '.join(l))
if y1 == y2:
	m = abs(x2 - x1)
	y3 = y1 + m
	y4 = y3
	x3 = x2
	x4 = x1
	l = [x3, y3, x4, y4]
	l = list(map(str, l))
	print(' '.join(l))
if x1 != x2 and y1 != y2:
	if abs(x1 - x2) != abs(y1 - y2):
		print('-1')
	else:
		l = [x1, y2, x2, y1]
		l = list(map(str, l))
		print(' '.join(l))


(x1, y1, x2, y2) = map(int, input().split())
if x1 != x2 and y1 != y2 and (abs(x2 - x1) != abs(y2 - y1)):
	print(-1)
elif x1 == x2:
	print('{0} {1} {2} {3}'.format(x1 + abs(y2 - y1), y1, x2 + abs(y2 - y1), y2))
elif y1 == y2:
	print('{0} {1} {2} {3}'.format(x1, y1 + abs(x2 - x1), x2, y2 + abs(x2 - x1)))
else:
	print('{0} {1} {2} {3}'.format(x1, y2, x2, y1))


(x1, y1, x2, y2) = map(int, input().split())
if y1 == y2:
	d = abs(x2 - x1)
	if y1 + d <= 1000:
		print(x1, y1 + d, x2, y2 + d)
	elif y1 - d >= -1000:
		print(x1, y1 - d, x2, y2 - d)
	else:
		print(-1)
elif x1 == x2:
	d = abs(y2 - y1)
	if x1 + d <= 1000:
		print(x1 + d, y1, x2 + d, y2)
	elif x1 - d >= -1000:
		print(x1 - d, y1, x2 - d, y2)
	else:
		print(-1)
elif abs(x2 - x1) == abs(y1 - y2):
	print(x1, y2, x2, y1)
else:
	print(-1)


def f(a, b, c, d):
	if a == c:
		s = abs(b - d)
		if a + s <= 1000:
			return ' '.join(map(str, [a + s, b, a + s, d]))
		elif a - s >= -1000:
			return ' '.join(map(str, [a - s, b, a + s, d]))
		else:
			return '-1'
	elif b == d:
		s = abs(a - c)
		if b + s <= 1000:
			return ' '.join(map(str, [a, b + s, c, b + s]))
		elif b - s >= -1000:
			return ' '.join(map(str, [a, b - s, c, b - s]))
		else:
			return '-1'
	else:
		s1 = abs(a - c)
		s2 = abs(b - d)
		if s1 == s2:
			return ' '.join(map(str, [c, b, a, d]))
		else:
			return '-1'
(a, b, c, d) = map(int, input().split())
print(f(a, b, c, d))


value = [int(m) for m in input().split()]
x1 = value[0]
x2 = value[2]
y1 = value[1]
y2 = value[3]
if not (y2 - y1 == 0 or x2 - x1 == 0 or abs(y2 - y1) == abs(x2 - x1)):
	print(-1)
else:
	if y2 - y1 == 0:
		print(str(x1) + ' ' + str(y1 + abs(x2 - x1)) + ' ' + str(x2) + ' ' + str(y2 + abs(x2 - x1)))
	if value[2] - value[0] == 0:
		print(str(x1 + abs(y2 - y1)) + ' ' + str(y1) + ' ' + str(x2 + abs(y2 - y1)) + ' ' + str(y2))
	if abs(value[1] - value[3]) == abs(value[2] - value[0]):
		print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))


(x1, y1, x2, y2) = map(int, input().split())
ans = 0
a = 0
if not (x2 - x1 == 0 or abs(y2 - y1) == abs(x2 - x1) or y2 - y1 == 0) or x2 == x1 == y1 == y2:
	print(-1)
else:
	if x1 == x2:
		a = y2 - y1
		ans = str(x1 + a) + ' ' + str(y1) + ' ' + str(x1 + a) + ' ' + str(y1 + a)
	elif y1 == y2:
		a = x2 - x1
		ans = str(x1) + ' ' + str(y1 + a) + ' ' + str(x2) + ' ' + str(y2 + a)
	else:
		a = y2 - y1
		ans = str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1)
	print(ans)


import io
import os
import math

def main():
	(x1, y1, x2, y2) = map(int, input().split())
	if x1 == x2:
		print(x1 + abs(y1 - y2), y1, x1 + abs(y1 - y2), y2)
	elif y1 == y2:
		print(x1, y1 + abs(x1 - x2), x2, y2 + abs(x1 - x2))
	elif abs(x1 - x2) == abs(y1 - y2):
		print(x1, y2, x2, y1)
	else:
		print(-1)
main()


import sys
input = sys.stdin.readline

def intl():
	return list(map(int, input().split()))
(x1, y1, x2, y2) = intl()
delta = 0
mini = min(x1, y1, x2, y2)
if mini < 0:
	delta = 0 - mini
	x1 += delta
	x2 += delta
	y1 += delta
	y2 += delta
error = False
l = 0
x3 = x1
y3 = y1
x4 = x2
y4 = y2
if x1 == x2:
	l = abs(y1 - y2)
	x3 = x1 + l
	x4 = x2 + l
	y3 = y1
	y4 = y2
elif y1 == y2:
	l = abs(x1 - x2)
	x3 = x1
	x4 = x2
	y3 = y1 + l
	y4 = y2 + l
else:
	l = abs(x1 - x2)
	l2 = abs(y1 - y2)
	if not l == l2:
		error = True
	if x1 < x2:
		x3 = x1 + l
		x4 = x1
		if y1 < y2:
			y3 = y1
			y4 = y1 + l
		else:
			y3 = y1
			y4 = y1 - l
	else:
		x3 = x1 - l
		x4 = x1
		if y1 < y2:
			y3 = y1
			y4 = y1 + l
		else:
			y3 = y1
			y4 = y1 - l
if error:
	print(-1)
else:
	print(x3 - delta, y3 - delta, x4 - delta, y4 - delta)


3
import sys
(x1, y1, x2, y2) = [int(x) for x in sys.stdin.readline().split()]
if x1 == x2:
	d = abs(y1 - y2)
	(x3, y3) = (x1 + d, y1)
	(x4, y4) = (x1 + d, y2)
elif y1 == y2:
	d = abs(x1 - x2)
	(x3, y3) = (x1, y1 + d)
	(x4, y4) = (x2, y1 + d)
elif abs(x1 - x2) != abs(y1 - y2):
	print('-1')
	return
else:
	(xa, xb) = (min(x1, x2), max(x1, x2))
	(ya, yb) = (min(y1, y2), max(y1, y2))
	points = [(xa, ya), (xa, yb), (xb, ya), (xb, yb)]
	((x3, y3), (x4, y4)) = [p for p in points if p not in [(x1, y1), (x2, y2)]]
print(x3, y3, x4, y4)


def main():
	(x1, y1, x2, y2) = list(map(int, input().split()))
	if x1 == x2:
		print(x1 + abs(y2 - y1), y1, x1 + abs(y2 - y1), y2)
	elif y1 == y2:
		print(x1, y1 + abs(x2 - x1), x2, y1 + abs(x2 - x1))
	elif abs(y2 - y1) != abs(x2 - x1):
		print(-1)
	else:
		print(x1, y2, x2, y1)
t = 1
while t != 0:
	main()
	t -= 1


(x1, y1, x2, y2) = input().split()
x1 = int(x1)
y1 = int(y1)
x2 = int(x2)
y2 = int(y2)
if x1 == x2:
	a = abs(y1 - y2)
	if -1000 <= x1 + a <= 1000:
		print('{} {} {} {}'.format(x1 + a, y1, x1 + a, y2))
	else:
		print(-1)
elif y1 == y2:
	a = abs(x1 - x2)
	if -1000 <= y1 + a <= 1000:
		print('{} {} {} {}'.format(x1, y1 + a, x2, y1 + a))
	else:
		print(-1)
elif x1 - x2 == y1 - y2:
	a = abs(x1 - x2)
	print('{} {} {} {}'.format(min(x1, x2), max(y1, y2), max(x1, x2), min(y1, y2)))
elif x1 - x2 == y2 - y1:
	a = abs(x1 - x2)
	print('{} {} {} {}'.format(min(x1, x2), min(y1, y2), max(x1, x2), max(y1, y2)))
else:
	print(-1)


(x1, y1, x2, y2) = input().split()
a = int(x1)
b = int(y1)
c = int(x2)
d = int(y2)
e = d - b
f = c - a
if f == 0:
	print(a + e, b, c + e, d)
elif e == 0:
	print(a, b + f, c, d + f)
elif e / f == 1:
	print(a, d, c, b)
elif e / f == -1:
	print(a, d, c, b)
else:
	print(-1)


import math
(x1, y1, x2, y2) = input().split(' ')
x1 = int(x1)
y1 = int(y1)
x2 = int(x2)
y2 = int(y2)
if x1 == x2 or y1 == y2:
	if x1 == x2:
		l = abs(y2 - y1)
		x3 = x1 + l
		x4 = x2 + l
		y3 = y1
		y4 = y2
		print(x3, y3, x4, y4)
	elif y1 == y2:
		l = abs(x2 - x1)
		y3 = y1 + l
		y4 = y2 + l
		x3 = x1
		x4 = x2
		print(x3, y3, x4, y4)
elif abs(y2 - y1) == abs(x2 - x1):
	if x1 == y1 and x2 == y2:
		l = int(math.sqrt(((x2 - x1) ** 2 + (y2 - y1) ** 2) / 2))
		if x1 < x2:
			x3 = x1 + l
			y3 = y1
			x4 = x2 - l
			y4 = y2
			print(x3, y3, x4, y4)
		else:
			x3 = x2 + l
			y3 = y2
			x4 = x1 - l
			y4 = y1
			print(x3, y3, x4, y4)
	else:
		l = y2 - y1
		x3 = x1
		x4 = x2
		y3 = y1 + l
		y4 = y2 - l
		print(x3, y3, x4, y4)
else:
	print(-1)


(x0, x1, x2, x3) = map(int, input().split())
if x2 - x0 == 0:
	distance = abs(x3 - x1)
	print(*[x0 + distance, x1, x2 + distance, x3], sep=' ')
elif x3 - x1 == 0:
	distance = abs(x2 - x0)
	print(*[x0, x1 + distance, x2, x3 + distance], sep=' ')
elif abs(x3 - x1) == abs(x2 - x0):
	print(*[x0, x3, x2, x1], sep=' ')
else:
	print(-1)


(x1, y1, x2, y2) = [int(x) for x in input().split()]
found = True
if x1 == x2:
	sides = abs(y2 - y1)
	x3 = x1 + sides
	y3 = y1
	x4 = x2 + sides
	y4 = y2
elif y1 == y2:
	sides = abs(x2 - x1)
	x3 = x1
	y3 = y1 + sides
	x4 = x2
	y4 = y2 + sides
elif abs(y2 - y1) == abs(x2 - x1):
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
else:
	found = False
	print(-1)
if found:
	print(x3, y3, x4, y4)


l = list(map(int, input().split()))
x1 = l[0]
x2 = l[2]
y1 = l[1]
y2 = l[3]
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print('-1')
elif x1 == x2:
	print(x1 + abs(y1 - y2), y1, x2 + abs(y1 - y2), y2, sep=' ')
elif y1 == y2:
	print(x1, y1 + abs(x1 - x2), x2, y2 + abs(x1 - x2), sep=' ')
else:
	print(x1, y2, x2, y1, sep=' ')


(a, b, c, d) = map(int, input().split(' '))
dis = ((a - c) ** 2 + (b - d) ** 2) ** 0.5
if a == c or b == d:
	if dis - int(dis) == 0:
		if a == c:
			x1 = a
			y1 = b
			x2 = c
			y2 = d
			if a + dis <= 1000:
				x1 += dis
				x2 += dis
			else:
				x1 -= dis
				x2 -= dis
			print(int(x1), b, int(x1), d)
		else:
			x1 = a
			y1 = b
			x2 = c
			y2 = d
			if b + dis <= 1000:
				y1 += dis
				y2 += dis
			else:
				y2 -= dis
				y1 -= dis
			print(a, int(y1), c, int(y2))
	else:
		print(-1)
elif abs(a - c) == abs(d - b):
	print(a, d, c, b)
else:
	print(-1)


from math import sqrt
(x1, y1, x2, y2) = [int(s) for s in input().split()]
d = int(sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2))
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print('-1')
elif x1 == x2:
	print(x1 + d, y1, x2 + d, y2)
elif y1 == y2:
	print(x1, y1 + d, x2, y2 + d)
else:
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = map(int, input().strip().split(' '))
if x1 == x2:
	s = abs(y2 - y1)
	arr = [str(x2 + s), str(y2), str(x2 + s), str(y1)]
	print(' '.join(arr))
elif y1 == y2:
	s = abs(x2 - x1)
	arr = [str(x2), str(y2 + s), str(x1), str(y2 + s)]
	print(' '.join(arr))
elif abs(y2 - y1) == abs(x2 - x1):
	arr = [str(x1), str(y2), str(x2), str(y1)]
	print(' '.join(arr))
else:
	print('-1')


(x1, y1, x2, y2) = map(int, input().split())
length = 0
if x1 == x2 or y1 == y2:
	if x1 == x2:
		length = abs(y1 - y2)
		if x1 + length <= 1000:
			print(x1 + length, y1, x1 + length, y2)
		elif x1 - length >= -1000:
			print(x1 - length, y1, x1 - length, y2)
		else:
			print('-1')
	else:
		length = abs(x1 - x2)
		if y1 + length <= 1000:
			print(x1, y1 + length, x2, y2 + length)
		elif y1 - length >= -1000:
			print(x1, y1 - length, x2, y2 - length)
		else:
			print('-1')
elif abs(x1 - x2) == abs(y1 - y2):
	print(x1, y2, x2, y1)
else:
	print('-1')


import math
(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	x3 = x1 + abs(y2 - y1)
	y3 = y1
	x4 = x2 + abs(y2 - y1)
	y4 = y2
	print(x3, y3, x4, y4) if round(math.sqrt((x4 - x1) ** 2 + (y4 - y1) ** 2), 5) == round(math.sqrt(2) * math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2), 5) else print(-1)
elif y1 == y2:
	x3 = x1
	y3 = y1 + abs(x2 - x1)
	x4 = x2
	y4 = y2 + abs(x2 - x1)
	print(x3, y3, x4, y4) if round(math.sqrt((x4 - x1) ** 2 + (y4 - y1) ** 2), 5) == round(math.sqrt(2) * math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2), 5) else print(-1)
else:
	x4 = x2
	y4 = y1
	x3 = x1
	y3 = y2
	print(x3, y3, x4, y4) if round(math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2), 5) == round(math.sqrt(2) * math.sqrt((x3 - x1) ** 2 + (y3 - y1) ** 2), 5) else print(-1)


a = [int(i) for i in input().split()]
x1 = a[0]
y1 = a[1]
x2 = a[2]
y2 = a[3]
l = 0
if x1 == x2:
	l = abs(y1 - y2)
	print(x1 + l, y1, x1 + l, y2)
elif y1 == y2:
	l = abs(x1 - x2)
	print(x1, y1 + l, x2, y1 + l)
elif abs(x1 - x2) == abs(y1 - y2):
	print(x2, y1, x1, y2)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
t = abs(x1 - x2)
a = abs(y1 - y2)
if a != t and t and a:
	print(-1)
elif t == 0:
	print(x1 + a, y1, x1 + a, y2)
elif a == 0:
	print(x1, y1 + t, x2, y1 + t)
else:
	print(x1, y2, x2, y1)


from sys import stdin, stdout
input = stdin.readline
(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	x3 = str(x1 + abs(y1 - y2))
	stdout.write(x3 + ' ')
	stdout.write(str(y1) + ' ')
	stdout.write(x3 + ' ')
	stdout.write(str(y2))
elif y1 == y2:
	y3 = str(y1 + abs(x1 - x2))
	stdout.write(str(x1) + ' ')
	stdout.write(y3 + ' ')
	stdout.write(str(x2) + ' ')
	stdout.write(y3)
elif abs(x1 - x2) == abs(y1 - y2):
	stdout.write(str(x1) + ' ' + str(y2) + ' ')
	stdout.write(str(x2) + ' ' + str(y1) + ' ')
else:
	stdout.write('-1')


a = [int(i) for i in input().split()]
if a[0] == a[2]:
	print(a[0] + a[1] - a[3], a[1], a[0] + a[1] - a[3], a[3])
elif a[1] == a[3]:
	print(a[0], a[1] + a[2] - a[0], a[2], a[1] + a[2] - a[0])
elif abs(a[2] - a[0]) == abs(a[3] - a[1]):
	print(a[0], a[3], a[2], a[1])
else:
	print(-1)


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

def garden(x1, y, x2, y2):
	a = abs(x1 - x2)
	b = abs(y1 - y2)
	if x1 == x2:
		print(x1 + b, y1, x2 + b, y2)
	elif y1 == y2:
		print(x1, y1 + a, x2, y2 + a)
	elif a != b:
		print(-1)
	else:
		print(x1, y2, x2, y1)
garden(x1, y1, x2, y2)


__author__ = 'myduomilia'
(x1, y1, x2, y2) = list(map(int, input().split()))
b = False
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
elif x1 == x2:
	print(x1 + abs(y1 - y2), y1, x2 + abs(y1 - y2), y2)
elif y1 == y2:
	print(x1, y1 + abs(x1 - x2), x2, y2 + abs(x1 - x2))
else:
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2 or y1 == y2:
	if x1 == x2:
		print(x1 + abs(y2 - y1), y1, x1 + abs(y1 - y2), y2)
	else:
		print(x1, y1 - abs(x2 - x1), x2, y1 - abs(x2 - x1))
else:
	if x1 - x2 == y1 - y2:
		x3 = min(x2, x1)
		x4 = max(x1, x2)
		y3 = max(y1, y2)
		y4 = min(y1, y2)
	else:
		x3 = min(x2, x1)
		x4 = max(x1, x2)
		y3 = min(y1, y2)
		y4 = max(y1, y2)
	if abs(x1 - x2) != abs(y1 - y2):
		print(-1)
	else:
		print(x3, y3, x4, y4)


import sys
(x1, y1, x2, y2) = map(int, sys.stdin.readline().split())
if x2 == x1:
	a = y2 - y1
	print(x1 + a, y1, x2 + a, y2)
elif y1 == y2:
	a = x2 - x1
	print(x1, y1 + a, x2, y2 + a)
elif x2 - x1 == y2 - y1 or x2 - x1 == y1 - y2:
	print(x1, y2, x2, y1)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
diffy = abs(y1 - y2)
diffx = abs(x1 - x2)
if diffx != 0 and diffy != 0 and (diffx != diffy):
	print(-1)
else:
	if diffx != 0 and diffy != 0:
		(x3, y3, x4, y4) = (x1, y2, x2, y1)
	elif diffx != 0:
		(x3, y3, x4, y4) = (x1, y1 + diffx, x2, y2 + diffx)
	else:
		(x3, y3, x4, y4) = (x1 + diffy, y1, x2 + diffy, y2)
	print(x3, y3, x4, y4)


inputlist = [int(item) for item in input().split()]
x = inputlist[0] - inputlist[2]
y = inputlist[1] - inputlist[3]
if abs(x) == abs(y):
	inputlist = inputlist[::-1]
	z = inputlist[0]
	inputlist.remove(z)
	inputlist.append(z)
	anslist = [str(item) for item in inputlist]
	result = ' '.join(anslist)
elif x == 0:
	for (p, q) in list(enumerate(inputlist)):
		if p == 0 or p == 2:
			inputlist[p] = inputlist[p] + y
		else:
			pass
	anslist = [str(item) for item in inputlist]
	result = ' '.join(anslist)
elif y == 0:
	for (p, q) in list(enumerate(inputlist)):
		if p == 1 or p == 3:
			inputlist[p] = inputlist[p] + x
		else:
			pass
	anslist = [str(item) for item in inputlist]
	result = ' '.join(anslist)
else:
	result = -1
print(result)


(x1, y1, x2, y2) = [int(x) for x in input().split()]
if x1 == x2 or y1 == y2:
	if x1 == x2:
		s = abs(y1 - y2)
		print(x1 + s, y1, x2 + s, y2)
	else:
		s = abs(x1 - x2)
		print(x1, y1 + s, x2, y2 + s)
elif abs(x1 - x2) == abs(y1 - y2):
	s = abs(x1 - x2)
	if x1 >= x2:
		print(x1 - s, y1, x2 + s, y2)
	else:
		print(x1 + s, y1, x2 - s, y2)
else:
	print(-1)


(x1, y1, x2, y2) = list(map(int, input().split()))
if x1 == x2:
	d = abs(y2 - y1)
	(x3, y3) = (x2 + d, y2)
	(x4, y4) = (x1 + d, y1)
	print('{x3} {y3} {x4} {y4}'.format(x3=x3, y3=y3, x4=x4, y4=y4))
elif y1 == y2:
	d = abs(x2 - x1)
	(x3, y3) = (x2, y2 + d)
	(x4, y4) = (x1, y1 + d)
	print('{x3} {y3} {x4} {y4}'.format(x3=x3, y3=y3, x4=x4, y4=y4))
else:
	d = abs(x2 - x1)
	true_dist = (x2 - x1) ** 2 + (y2 - y1) ** 2
	apparent_dist = 2 * d ** 2
	if true_dist == apparent_dist:
		if min(y1, y2) == y1:
			dist = x2 - x1
			(x3, y3) = (x1 + dist, y1)
			(x4, y4) = (x2 - dist, y2)
			print('{x3} {y3} {x4} {y4}'.format(x3=x3, y3=y3, x4=x4, y4=y4))
		else:
			dist = x1 - x2
			(x3, y3) = (x2 + dist, y2)
			(x4, y4) = (x1 - dist, y1)
			print('{x3} {y3} {x4} {y4}'.format(x3=x3, y3=y3, x4=x4, y4=y4))
	else:
		print(-1)


def ok(x):
	return x >= -1000 and x <= 1000
a = input().split(' ')
x1 = int(a[0])
y1 = int(a[1])
x2 = int(a[2])
y2 = int(a[3])
if x1 == x2:
	x = y1 - y2 + x1
	if ok(x):
		print('%d %d %d %d' % (x, y1, x, y2))
	else:
		x = y2 - x1 + x1
		if ok(x):
			print('%d %d %d %d' % (x, y1, x, y2))
		else:
			print('-1')
elif y1 == y2:
	y = x1 - x2 + y1
	if ok(y):
		print('%d %d %d %d' % (x1, y, x2, y))
	else:
		y = x2 - x1 + y1
		if ok(y):
			print('%d %d %d %d' % (x1, y, x2, y))
		else:
			print('-1')
else:
	a = abs(x1 - x2)
	b = abs(y1 - y2)
	if a != b:
		print(-1)
	else:
		print('%d %d %d %d' % (x1, y2, x2, y1))


import sys
import math

def main():
	pass

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def sinp():
	return sys.stdin.readline().strip()

def iinp():
	return int(input())

def ninp():
	return map(int, sys.stdin.readline().strip().split())

def linp():
	return list(map(int, sys.stdin.readline().strip().split()))

def p(a):
	print(a)
(x1, y1, x2, y2) = ninp()
if x1 != x2 and y1 != y2 and (abs(x2 - x1) != abs(y2 - y1)):
	print(-1)
elif x1 == x2:
	x3 = x1 + abs(y2 - y1)
	x4 = x1 + abs(y2 - y1)
	y3 = y1
	y4 = y2
	print(x3, y3, x4, y4)
elif y1 == y2:
	y3 = y1 + abs(x2 - x1)
	y4 = y1 + abs(x2 - x1)
	x3 = x1
	x4 = x2
	print(x3, y3, x4, y4)
else:
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
	print(x3, y3, x4, y4)


def sad(x1, y1, x2, y2):
	if y1 == y2:
		return [x1, y1 + abs(x1 - x2), x2, y2 + abs(x1 - x2)]
	elif x1 == x2:
		return [x1 + abs(y1 - y2), y1, x2 + abs(y1 - y2), y2]
	elif abs(x1 - x2) != abs(y1 - y2):
		return [-1]
	return [x1, y2, x2, y1]
(X1, Y1, X2, Y2) = [int(i) for i in input().split()]
print(*sad(X1, Y1, X2, Y2))


(x, y, xx, yy) = list(map(int, input().split()))
if x == xx:
	print(x + yy - y, y, xx + yy - y, yy)
elif y == yy:
	print(x, y + xx - x, xx, yy + xx - x)
elif xx - x != yy - y and xx - x != y - yy:
	print(-1)
else:
	print(x, yy, xx, y)


(x1, y1, x2, y2) = map(int, input().split())
xd = x1 - x2
yd = y1 - y2
if xd != 0 and yd != 0:
	(x3, y3, x4, y4) = (x1, y2, x2, y1)
elif xd != 0:
	(x3, y3) = (x1, y1 + abs(xd))
	(x4, y4) = (x2, y2 + abs(xd))
else:
	(x3, y3) = (x1 + abs(yd), y1)
	(x4, y4) = (x2 + abs(yd), y2)
if xd != 0 and yd != 0 and (abs(xd) != abs(yd)):
	print(-1)
else:
	print(x3, y3, x4, y4)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	a = abs(y1 - y2)
	print(str(x1 + a) + ' ' + str(y1) + ' ' + str(x2 + a) + ' ' + str(y2))
elif y1 == y2:
	a = abs(x1 - x2)
	print(str(x1) + ' ' + str(y1 + a) + ' ' + str(x2) + ' ' + str(y2 + a))
elif abs(x1 - x2) == abs(y1 - y2):
	a = abs(x1 - x2)
	if x1 < x2 and y1 < y2 or (x1 > x2 and y1 > y2):
		print(str(min(x1, x2)) + ' ' + str(min(y1, y2) + a) + ' ' + str(min(x1, x2) + a) + ' ' + str(min(y1, y2)))
	else:
		print(str(max(x1, x2)) + ' ' + str(min(y1, y2) + a) + ' ' + str(max(x1, x2) - a) + ' ' + str(min(y1, y2)))
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	temp = abs(y2 - y1) + x1
	print(temp, y1, temp, y2)
elif y1 == y2:
	temp = abs(x2 - x1) + y1
	print(x1, temp, x2, temp)
elif not abs(x1 - x2) == abs(y1 - y2):
	print(-1)
else:
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = map(int, input().split())
xdif = abs(x2 - x1)
ydif = abs(y2 - y1)
if x1 == x2:
	print(x1 + ydif, y1, x2 + ydif, y2)
elif y1 == y2:
	print(x1, y1 + xdif, x2, y2 + xdif)
elif xdif != ydif:
	print(-1)
else:
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = list(map(int, input().rstrip().split(' ')))
xdiff = abs(x1 - x2)
ydiff = abs(y1 - y2)
if xdiff == 0 and ydiff != 0:
	x3 = x1 + ydiff
	y3 = y1
	x4 = x1 + ydiff
	y4 = y2
	print(x3, y3, x4, y4)
elif xdiff != 0 and ydiff == 0:
	x3 = x1
	y3 = y1 + xdiff
	x4 = x2
	y4 = y1 + xdiff
	print(x3, y3, x4, y4)
elif xdiff == ydiff:
	x3 = x1
	x4 = x2
	y3 = y2
	y4 = y1
	print(x3, y3, x4, y4)
else:
	print('-1')


(x1, y1, x2, y2) = map(int, input().split())
newX1 = 0
newY1 = 0
newX2 = 0
newY2 = 0
answer = '-1'
if x1 == x2:
	newX2 = x1 + abs(y1 - y2)
	newX1 = newX2
	newY1 = y1
	newY2 = y2
	answer = str(newX1) + ' ' + str(newY1) + ' ' + str(newX2) + ' ' + str(newY2)
elif y1 == y2:
	newY1 = y1 + abs(x1 - x2)
	newY2 = newY1
	newX1 = x1
	newX2 = x2
	answer = str(newX1) + ' ' + str(newY1) + ' ' + str(newX2) + ' ' + str(newY2)
elif x1 != x2 and y1 != y2 and (abs(x1 - x2) == abs(y1 - y2)):
	newX1 = x1
	newY1 = y2
	newX2 = x2
	newY2 = y1
	answer = str(newX1) + ' ' + str(newY1) + ' ' + str(newX2) + ' ' + str(newY2)
print(answer)


from math import sqrt
(x1, y1, x2, y2) = (int(i) for i in input().split())
(w, h) = (int(sqrt((x1 - x2) ** 2)), int(sqrt((y1 - y2) ** 2)))
if x1 == x2:
	x3 = x1 + h
	y3 = y1
	x4 = x1 + h
	y4 = y2
	print(x3, y3, x4, y4)
elif y1 == y2:
	x3 = x1
	y3 = y1 + w
	x4 = x2
	y4 = y1 + w
	print(x3, y3, x4, y4)
elif w != h:
	print(-1)
else:
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
	print(x3, y3, x4, y4)


(x1, y1, x2, y2) = input().split()
(x1, y1, x2, y2) = (int(x1), int(y1), int(x2), int(y2))
ans = -1
if x1 == x2:
	x3 = x4 = x1 + abs(y1 - y2)
	y3 = y2
	y4 = y1
	ans = 0
elif y1 == y2:
	y3 = y4 = y1 + abs(x1 - x2)
	x3 = x2
	x4 = x1
	ans = 0
elif abs(x1 - x2) == abs(y1 - y2):
	side = abs(x1 - x2)
	x3 = min(x2, x1)
	x4 = max(x2, x1)
	if x2 < x1:
		y3 = y1
		y4 = y2
		ans = 0
	else:
		y3 = y2
		y4 = y1
		ans = 0
else:
	print(ans)
if ans == 0:
	print(x3, y3, x4, y4)


def func(x1, y1, x2, y2):
	if x1 != x2 and y1 != y2:
		x = abs(x1 - x2)
		y = abs(y1 - y2)
		if x != y:
			print(-1)
		else:
			(x3, x4) = (x1, x2)
			(y3, y4) = (y2, y1)
			print(x3, y3, x4, y4)
	elif x1 != x2:
		y = abs(x1 - x2)
		x = y
		(x3, x4) = (x1, x2)
		if y1 + x < 1001:
			y3 = y4 = y1 + x
			print(x3, y3, x4, y4)
		elif y1 - x > -1001:
			y3 = y4 = y1 - x
			print(x3, y3, x4, y4)
		else:
			print(-1)
	elif y1 != y2:
		x = abs(y1 - y2)
		y = x
		(y3, y4) = (y1, y2)
		if x1 + y <= 1001:
			x3 = x4 = x1 + y
			print(x3, y3, x4, y4)
		elif x1 - y > -1001:
			x3 = x4 = x1 - y
			print(x3, y3, x4, y4)
		else:
			print(-1)
	else:
		print(-1)
(x1, y1, x2, y2) = map(int, input().split())
func(x1, y1, x2, y2)


import sys
inf = float('inf')
(mod, MOD) = (1000000007, 998244353)
from math import ceil, floor, log, sqrt, factorial

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
(x1, y1, x2, y2) = get_ints()
if x1 == x2:
	x3 = abs(y2 - y1) + x1
	print(x3, y1, x3, y2)
elif y1 == y2:
	y3 = abs(x2 - x1) + y1
	print(x1, y3, x2, y3)
elif abs(x2 - x1) != abs(y2 - y1):
	print(-1)
else:
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = [int(i) for i in input().split()]
x = abs(x1 - x2)
y = abs(y1 - y2)
if x == 0:
	print(x1 + y, y1, x2 + y, y2)
elif y == 0:
	print(x1, y1 + x, x2, y2 + x)
elif x / y == 1:
	print(x1, y2, x2, y1)
else:
	print(-1)


def rot(x, y):
	return (y, -x)

def vec(a, b, c, d):
	return (c - a, d - b)

def vecadd(a, b, c, d):
	return (a + c, b + d)
(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	(ver1, ver2) = vec(x1, y1, x2, y2)
	(hor1, hor2) = rot(ver1, ver2)
	print(vecadd(x1, y1, hor1, hor2)[0], vecadd(x1, y1, hor1, hor2)[1], vecadd(x2, y2, hor1, hor2)[0], vecadd(x2, y2, hor1, hor2)[1])
elif y1 == y2:
	(hor1, hor2) = vec(x1, y1, x2, y2)
	(ver1, ver2) = rot(hor1, hor2)
	print(vecadd(x1, y1, ver1, ver2)[0], vecadd(x1, y1, ver1, ver2)[1], vecadd(x2, y2, ver1, ver2)[0], vecadd(x2, y2, ver1, ver2)[1])
else:
	(dia1, dia2) = vec(x1, y1, x2, y2)
	if abs(dia1) != abs(dia2):
		print(-1)
	else:
		print(x1, y2, x2, y1)


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2 and y1 == y2:
	print(-1)
elif x1 == x2:
	d = abs(y1 - y2)
	print(x1 + d, y1, x2 + d, y2)
elif y1 == y2:
	d = abs(x1 - x2)
	print(x1, y1 + d, x2, y2 + d)
elif abs(x1 - x2) != abs(y1 - y2):
	print(-1)
else:
	d = abs(x1 - x2)
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = list(map(int, input().split()))
(d1, d2) = (abs(x2 - x1), abs(y2 - y1))
if x1 == x2:
	print(x1 + d2, y1, x2 + d2, y2)
elif y1 == y2:
	print(x1, y1 + d1, x2, y2 + d1)
elif d1 == d2:
	print(x1, y2, x2, y1)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	diff = abs(y2 - y1)
	x3 = x1 + diff
	y3 = y1
	x4 = x3
	y4 = y2
elif y1 == y2:
	diff = abs(x2 - x1)
	x3 = x1
	y3 = y1 + diff
	x4 = x2
	y4 = y3
else:
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
	if abs(x1 - x2) != abs(y1 - y2):
		print(-1)
		exit()
print('{} {} {} {}'.format(x3, y3, x4, y4))


line = [int(i) for i in str(input()).split()]
x1 = line[0]
y1 = line[1]
x2 = line[2]
y2 = line[3]
if y1 == y2:
	dist = x2 - x1
	print('%s %s %s %s' % (x1, y1 + dist, x2, y2 + dist))
elif x2 == x1:
	dist = y2 - y1
	print('%s %s %s %s' % (x1 + dist, y1, x2 + dist, y2))
elif abs(x2 - x1) == abs(y2 - y1) or x2 + x1 == y2 + y1:
	print('%s %s %s %s' % (x1, y2, x2, y1))
else:
	print(-1)


inp = list(map(int, input().split()))
x1 = inp[0]
y1 = inp[1]
x2 = inp[2]
y2 = inp[3]
if x1 == x2:
	lent = abs(y1 - y2)
	print(x1 + lent, end=' ')
	print(y1, end=' ')
	print(x2 + lent, end=' ')
	print(y2)
elif y1 == y2:
	lent = abs(x1 - x2)
	print(x1, end=' ')
	print(y1 + lent, end=' ')
	print(x2, end=' ')
	print(y2 + lent)
elif abs(x1 - x2) == abs(y1 - y2):
	print(x2, end=' ')
	print(y1, end=' ')
	print(x1, end=' ')
	print(y2)
else:
	print('-1')


[x1, y1, x2, y2] = list(map(int, input().split(' ')))
if x1 != x2 and y1 != y2:
	if abs(x1 - x2) != abs(y1 - y2):
		print(-1)
	else:
		print(x1, y2, x2, y1)
elif x1 == x2:
	dy = y1 - y2
	print(x1 + dy, y1, x2 + dy, y2)
else:
	dx = x1 - x2
	print(x1, y1 + dx, x2, y2 + dx)


(x1, y1, x2, y2) = input().split()
x1 = int(x1)
x2 = int(x2)
y2 = int(y2)
y1 = int(y1)
x3 = 0
y3 = 0
x4 = 0
y4 = 0
sz = abs(x2 - x1)
sy = abs(y2 - y1)
sx = max(sz, sy)
if sz == sy:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	print(x3, y3, x4, y4, sep=' ')
elif x1 == x2:
	x3 = x1 + sy
	y3 = y1
	x4 = x2 + sy
	y4 = y2
	print(x3, y3, x4, y4, sep=' ')
elif y1 == y2:
	x3 = x1
	y3 = y1 + sx
	x4 = x2
	y4 = y2 + sx
	print(x3, y3, x4, y4, sep=' ')
else:
	print('-1')


(a, b, c, d) = list(map(int, input().split()))
p = abs(a - c)
q = abs(b - d)
if p > 0 and q > 0 and (p != q):
	print(-1)
elif p > 0 and q > 0 and (p == q):
	print(a, d, c, b)
elif a == c:
	print(a + abs(b - d), b, a + abs(b - d), d)
elif b == d:
	print(a, b + abs(a - c), c, d + abs(a - c))


(a, b, c, d) = map(int, input().split())
r = [-1]
if abs(a - c) == abs(b - d) and a - c:
	r = [c, b, a, d]
elif a == c and b - d:
	r = [a + d - b, b, c + d - b, d]
elif b == d and a - c:
	r = [a, b + c - a, c, d + c - a]
print(' '.join((repr(n) for n in r)))


(x1, y1, x2, y2) = [int(i) for i in input().split()]
(l1, l2) = (abs(x2 - x1), abs(y2 - y1))
if l1 * l2 != 0 and l1 != l2:
	print(-1)
elif l1 == l2:
	print(x2, y1, x1, y2)
elif l2 == 0:
	print(x1, y1 + l1, x2, y2 + l1)
else:
	print(x1 + l2, y1, x2 + l2, y2)


point = list(map(int, input().split()))
x = point[2] - point[0]
y = point[3] - point[1]
if x == 0:
	output = [point[0] + y, point[1], point[2] + y, point[3]]
	print(' '.join(map(str, output)))
elif y == 0:
	output = [point[0], point[1] + x, point[2], point[3] + x]
	print(' '.join(map(str, output)))
elif x == -y:
	output = [point[0], point[1] + y, point[0] + x, point[1]]
	print(' '.join(map(str, output)))
elif x == y:
	output = [point[0], point[1] + y, point[0] + y, point[1]]
	print(' '.join(map(str, output)))
else:
	print(-1)


(a, b, c, d) = map(int, input().split())
if a != c and b != d:
	w = 1
	if c - a == d - b:
		print(a + (c - a), b, a, b + (c - a))
		w = 0
	if c - a == -(d - b):
		print(a + (c - a), b, a, b + (d - b))
		w = 0
	if w == 1:
		print(-1)
if a == c:
	print(a + (d - b), b, a + (d - b), b + (d - b))
if b == d:
	print(a, b + (c - a), a + (c - a), b + (c - a))


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	print(x1 + y1 - y2, y2, x1 + y1 - y2, y1)
	quit()
elif y1 == y2:
	print(x1, y1 + x1 - x2, x2, y2 + x1 - x2)
	quit()
elif abs(x1 - x2) == abs(y1 - y2):
	print(x1, y2, x2, y1)
	quit()
print(-1)


(x1, y1, x2, y2) = list(map(int, input().split()))
sa = abs(x1 - x2)
sb = abs(y1 - y2)
if sa == sb:
	print(*(x1, y2, x2, y1))
elif x1 == x2:
	print(*(x1 + sb, y1, x2 + sb, y2))
elif y1 == y2:
	print(*(x1, y1 + sa, x2, y2 + sa))
else:
	print(-1)


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
(x1, y1, x2, y2) = f()
l = abs(x1 - x2)
b = abs(y1 - y2)
if x1 == x2:
	print(x1 + b, y1, x2 + b, y2)
elif y1 == y2:
	print(x1, y1 + l, x2, y2 + l)
elif l != b:
	print(-1)
else:
	print(x1, y2, x2, y1)


import sys
(x1, y1, x2, y2) = map(int, input().split())
if x2 == x1 or y2 == y1:
	if x2 == x1:
		print(x1 + y2 - y1, y1, x2 + y2 - y1, y2)
		sys.exit()
	else:
		print(x1, y1 + x2 - x1, x2, y2 + x2 - x1)
		sys.exit()
elif abs(x2 - x1) != abs(y2 - y1):
	print(-1)
	sys.exit()
else:
	print(x1, y2, x2, y1)


L = list(map(int, input().split()))
D = []
if L[0] == L[2]:
	a = L[3] - L[1]
	D.append(a + L[0])
	D.append(L[1])
	D.append(a + L[2])
	D.append(L[3])
elif L[1] == L[3]:
	a = L[2] - L[0]
	D.append(L[0])
	D.append(L[1] + a)
	D.append(L[2])
	D.append(L[3] + a)
elif abs(L[2] - L[0]) == abs(L[3] - L[1]):
	a = L[2] - L[0]
	D.append(L[0])
	D.append(L[3])
	D.append(L[2])
	D.append(L[1])
elif abs(L[3] - L[0]) == abs(L[2] - L[1]):
	D.append(L[0])
	D.append(L[3])
	D.append(L[2])
	D.append(L[1])
if len(D) == 4:
	for i in range(4):
		print(D[i], end=' ')
else:
	print('-1')


import sys
import math
xy = [int(x) for x in sys.stdin.readline().split()]
x1 = xy[0]
y1 = xy[1]
x2 = xy[2]
y2 = xy[3]
if x1 == x2:
	print(str(x1 + int(math.fabs(y1 - y2))) + ' ' + str(y1) + ' ' + str(x2 + int(math.fabs(y1 - y2))) + ' ' + str(y2))
elif y1 == y2:
	print(str(x1) + ' ' + str(y1 + int(math.fabs(x1 - x2))) + ' ' + str(x2) + ' ' + str(y2 + int(math.fabs(x1 - x2))))
elif math.fabs(math.fabs(x1 - x2)) == math.fabs(math.fabs(y1 - y2)):
	print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))
else:
	print(-1)


(l, m, n, o) = input().split()
a = int(l)
b = int(m)
c = int(n)
d = int(o)
e = d - b
f = c - a
if f == 0:
	print(a + e, b, c + e, d)
elif e == 0:
	print(a, b + f, c, d + f)
elif e / f == 1:
	print(a, d, c, b)
elif e / f == -1:
	print(a, d, c, b)
else:
	print(-1)


(a, b, c, d) = map(int, input().rstrip().split())
d1 = a - c
d2 = b - d
if abs(d1) == abs(d2):
	print((a + c + d - b) // 2, (b + d + a - c) // 2, (a + c + b - d) // 2, (b + d + c - a) // 2)
elif d1 == 0 or d2 == 0:
	print(*[[a + d2, b, c + d2, d], [a, b + d1, c, d + d1]][d2 == 0])
else:
	print(-1)


from math import *
(x1, y1, x2, y2) = map(int, input().split())
l = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
slope = 100
if x2 != x1:
	slope = (y2 - y1) / (x2 - x1)
(xmin, ymin) = min((x1, y1), (x2, y2))
(xmax, ymax) = max((x1, y1), (x2, y2))
(x1, y1) = (xmin, ymin)
(x2, y2) = (xmax, ymax)
if slope == 0.0:
	print(x2, y2 + x2 - x1, x1, y1 + x2 - x1)
elif x2 == x1:
	print(x1 + y2 - y1, y1, x1 + y2 - y1, y2)
elif slope == 1.0:
	print(int(l * cos(atan(slope))) + x1, y1, x1, y2)
elif slope == -1.0:
	print(x1 + int(l * cos(atan(slope))), y1, x1, y2)
else:
	print(-1)


(x, y, x1, y1) = map(int, input().split())
mas = [[x, y], [x1, y1]]
mas.sort()
(x, y, x1, y1) = (mas[0][0], mas[0][1], mas[1][0], mas[1][1])
if x == x1:
	print(x + y1 - y, y, x1 + y1 - y, y1)
elif y == y1:
	print(x, y + x1 - x, x1, y1 + x1 - x)
elif abs(x1 - x) == abs(y1 - y):
	print(x, y1, x1, y)
else:
	print(-1)


import sys
import math
import os
(x1, y1, x2, y2) = list(map(int, input().split()))
if x1 != x2 and y1 != y2:
	if abs(x1 - x2) != abs(y1 - y2):
		print(-1)
	else:
		print(x1, y2, x2, y1)
elif x1 == x2:
	print(x1 + abs(y2 - y1), y1, x1 + abs(y2 - y1), y2)
else:
	print(x1, y1 + abs(x1 - x2), x2, y2 + abs(x1 - x2))


a = [0, 0]
b = [0, 0]
(a[0], a[1], b[0], b[1]) = map(int, input().split())
if a[0] == b[0]:
	d = abs(a[1] - b[1])
	print(a[0] + d, a[1], b[0] + d, b[1])
elif a[1] == b[1]:
	d = abs(a[0] - b[0])
	print(a[0], a[1] + d, b[0], b[1] + d)
else:
	d1 = abs(a[0] - b[0])
	d2 = abs(a[1] - b[1])
	if d1 != d2:
		print(-1)
	else:
		print(min(a, b)[0] + d1, min(a, b)[1], max(a, b)[0] - d1, max(a, b)[1])


inp = str(input()).split()
x1 = int(inp[0])
y1 = int(inp[1])
x2 = int(inp[2])
y2 = int(inp[3])
xabs = abs(x1 - x2)
yabs = abs(y1 - y2)
if x1 != x2 and y1 != y2 and (xabs != yabs):
	print(-1)
elif x1 == x2:
	print('{} {} {} {}'.format(x1 + yabs, y1, x2 + yabs, y2))
elif y1 == y2:
	print('{} {} {} {}'.format(x1, y1 + xabs, x2, y2 + xabs))
else:
	print('{} {} {} {}'.format(x1, y2, x2, y1))


(x1, y1, x2, y2) = map(int, input().split(' '))
d1 = y2 - y1
d2 = x2 - x1
if d1 == 0:
	x3 = x1
	x4 = x2
	y31 = y1 + abs(x2 - x1)
	y41 = y2 + abs(x2 - x1)
	print(x3, y31, x4, y41)
elif d2 == 0:
	y3 = y1
	y4 = y2
	x31 = x1 + abs(y2 - y1)
	x41 = x2 + abs(y2 - y1)
	print(x31, y3, x41, y4)
elif (int(d1 / d2) == 1 or int(d1 / d2) == -1) and d1 % d2 == 0:
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
	print(x3, y3, x4, y4)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split(' '))
res = []
if x1 == x2:
	res = [x1 + y2 - y1, y1, x2 + y2 - y1, y2]
elif y1 == y2:
	res = [x1, y1 + x2 - x1, x2, y2 + x2 - x1]
elif abs(x1 - x2) == abs(y1 - y2):
	res = [x1, y2, x2, y1]
else:
	res = [-1]
print(' '.join(map(str, res)))


def solve(xa, ya, xb, yb):
	vertices = set([(xa, ya), (xb, yb)])
	dx = abs(xa - xb)
	dy = abs(ya - yb)
	if xa != xb and ya != yb and (dx != dy):
		return '-1'
	x = min(xa, xb)
	y = min(ya, yb)
	side = max(dx, dy)
	vertices.add((x, y))
	vertices.add((x + side, y))
	vertices.add((x, y + side))
	vertices.add((x + side, y + side))
	vertices.remove((xa, ya))
	vertices.remove((xb, yb))
	res = ' '.join(('{} {}'.format(i[0], i[1]) for i in vertices))
	return res.strip()

def test():
	parse = lambda st: [int(x) for x in st.split()]
	assert solve(*parse('0 0 0 1')) == '1 0 1 1'
print(solve(*[int(x) for x in input().split()]))


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	x = abs(y2 - y1)
	ls = [x1 + x, y1, x1 + x, y2]
	print(' '.join(map(str, ls)))
elif y1 == y2:
	x = abs(x2 - x1)
	ls = [x1, y1 + x, x2, y2 + x]
	print(' '.join(map(str, ls)))
elif abs(x2 - x1) == abs(y2 - y1):
	ls = [x1, y2, x2, y1]
	print(' '.join(map(str, ls)))
else:
	print(-1)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x
for t in range(1):
	(x1, y1, x2, y2) = list(map(int, input().split()))
	xd = abs(x2 - x1)
	yd = abs(y2 - y1)
	if (x1 != x2 and y2 != y1) and xd != yd:
		print(-1)
	elif x1 == x2:
		print(x1 + yd, y1, x2 + yd, y2)
	elif y2 == y1:
		print(x1, y1 + xd, x2, y2 + xd)
	else:
		print(x1, y2, x2, y1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2 or y1 == y2:
	if x1 == x2:
		x3 = x1 + y2 - y1
		y3 = y1
		x4 = x2 + y2 - y1
		y4 = y2
		if x3 < -1000 or x3 > 1000 or x4 < -1000 or (x4 > 1000):
			x3 = x1 - y2 + y1
			y3 = y1
			x4 = x2 - y2 + y1
			y4 = y2
			if x3 < -1000 or x3 > 1000 or x4 < -1000 or (x4 > 1000):
				print(-1)
			else:
				print(x3, y3, x4, y4)
		else:
			print(x3, y3, x4, y4)
	else:
		x3 = x1
		y3 = y1 + x2 - x1
		x4 = x2
		y4 = y2 + x2 - x1
		if y3 < -1000 or y3 > 1000 or y4 < -1000 or (y4 > 1000):
			x3 = x1
			y3 = y1 - x2 + x1
			x4 = x2
			y4 = y2 - x2 + x1
			if y3 < -1000 or y3 > 1000 or y4 < -1000 or (y4 > 1000):
				print(-1)
			else:
				print(x3, y3, x4, y4)
		else:
			print(x3, y3, x4, y4)
elif x2 - x1 == y2 - y1:
	print(x1, y2, x2, y1)
elif x1 - x2 == y2 - y1:
	print(x2, y1, x1, y2)
else:
	print(-1)


inp = input().split(' ')
l = []
x = int(inp[0])
y = int(inp[1])
x1 = int(inp[2])
y1 = int(inp[3])
if y == y1:
	k = x1 - x
	y2 = y - k
	x2 = x
	x3 = x1
	y3 = y1 - k
	if abs(x2 - x1) != abs(y2 - y1):
		print(-1)
	else:
		print(x2, y2, x3, y3)
elif x == x1:
	k = y1 - y
	y3 = y1
	x3 = x1 + k
	x2 = x + k
	y2 = y
	if abs(x2 - x1) != abs(y2 - y1):
		print(-1)
	else:
		print(x2, y2, x3, y3)
else:
	k = y - y1
	y3 = y
	x3 = x1
	x2 = x
	y2 = y - k
	if abs(x - x1) != abs(y - y1):
		print(-1)
	else:
		print(x2, y2, x3, y3)


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [int(i) for i in input()]

def inn():
	return int(input())
mo = 1000000007
(x1, y1, x2, y2) = value()
if x1 == x2 and y2 == y1:
	print(-1)
elif x1 == x2 or y1 == y2:
	if x1 == x2:
		if y1 < y2:
			(y1, y2) = (y2, y1)
		res = y1 - y2
		print(x1 + res, y1, x2 + res, y2)
	else:
		if x1 < x2:
			(x1, x2) = (x2, x1)
		res = x1 - x2
		print(x1, y1 + res, x2, y2 + res)
elif abs(x1 - x2) != abs(y1 - y2):
	print(-1)
else:
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = list(map(int, input().split()))
if x2 - x1 != 0:
	m = (y2 - y1) / (x2 - x1)
else:
	m = str('null')
if m == 'null':
	(x3, x4) = (y2 - y1 + x1, y2 - y1 + x1)
	(y3, y4) = (y1, y2)
	print(x3, y3, x4, y4)
elif m == 0:
	(x3, x4) = (x1, x2)
	(y3, y4) = (x2 - x1 + y1, x2 - x1 + y1)
	print(x3, y3, x4, y4)
elif m == 1 or m == -1:
	(x3, x4) = (x1, x2)
	(y3, y4) = (y2, y1)
	print(x3, y3, x4, y4)
else:
	print('-1')


def garden():
	(x1, y1, x2, y2) = map(int, input().split())
	s1 = x2 - x1
	s2 = y2 - y1
	if s1 != 0 and s2 != 0 and (abs(s1) != abs(s2)):
		print(-1)
		return
	elif s1 == 0:
		x3 = x1 + s2
		x4 = x1 + s2
		y3 = y1
		y4 = y2
	elif s2 == 0:
		x3 = x1
		x4 = x2
		y3 = y1 + s1
		y4 = y2 + s1
	else:
		x3 = x1
		x4 = x2
		y3 = y2
		y4 = y1
	print(x3, y3, x4, y4)
garden()


(x1, y1, x2, y2) = map(int, input().split())
import math
if abs(x1 - x2) == 0:
	p = abs(y2 - y1)
	print(x1 + p, y1, x2 + p, y2)
elif abs(y1 - y2) == 0:
	p = abs(x2 - x1)
	print(x1, y1 + p, x2, y2 + p)
else:
	if x2 < x1:
		(x2, x1, y2, y1) = (x1, x2, y1, y2)
	p = math.sqrt((x1 - x2) ** 2 + (y2 - y1) ** 2)
	if abs(y2 - y1) / abs(x2 - x1) == 1.0:
		a = int(p * math.cos(0.785398))
		b = int(p * math.cos(0.785398))
		if y1 < y2:
			print(x1, y1 + b, x1 + a, y1)
		elif y1 > y2:
			print(x1, y1 - b, x1 + a, y1)
	else:
		print(-1)


(x1, y1, x2, y2) = list(map(int, input().split()))
if x1 == x2 or y1 == y2:
	if x1 == x2:
		a = abs(y1 - y2)
		x3 = x1 + a
		y3 = y1
		x4 = x3
		y4 = y2
		print(x3, end=' ')
		print(y3, end=' ')
		print(x4, end=' ')
		print(y4)
	else:
		a = abs(x1 - x2)
		y3 = y1 + a
		x3 = x1
		y4 = y3
		x4 = x2
		print(x3, end=' ')
		print(y3, end=' ')
		print(x4, end=' ')
		print(y4)
else:
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
	if (x1 - x3) ** 2 + (y1 - y3) ** 2 == (x2 - x3) ** 2 + (y2 - y3) ** 2:
		print(x3, end=' ')
		print(y3, end=' ')
		print(x4, end=' ')
		print(y4)
	else:
		print(-1)


import math
(x0, y0, x1, y1) = map(int, input().split())
if x1 - x0 == 0:
	l = y1 - y0
	print(x0 + l, y0, x1 + l, y1)
elif y1 - y0 == 0:
	l = x1 - x0
	print(x0, y0 + l, x1, y1 + l)
elif (y1 - y0) / (x1 - x0) == 1 or (y1 - y0) / (x1 - x0) == -1:
	l = x1 - x0
	print(x0 + l, y0, x1 - l, y1)
else:
	print(-1)


(a, b, c, d) = map(int, input().split())
if b == d:
	dd = abs(c - a)
	p = a
	q = b + dd
	r = c
	s = d + dd
	print(p, q, r, s)
elif a == c:
	dd = abs(b - d)
	p = a + dd
	q = b
	r = c + dd
	s = d
	print(p, q, r, s)
elif a < c:
	p = c
	q = b
	r = a
	s = d
	aa = abs(p - a)
	bb = abs(q - d)
	cc = abs(s - b)
	dd = abs(r - c)
	if aa == bb and bb == cc and (cc == dd):
		print(p, q, r, s)
	else:
		print(-1)
else:
	p = a
	q = d
	r = c
	s = b
	aa = abs(p - c)
	bb = abs(q - b)
	cc = abs(r - a)
	dd = abs(s - d)
	if aa == bb and bb == cc and (cc == dd):
		print(p, q, r, s)
	else:
		print(-1)


n = list(map(int, input().split()))
x1 = n[0]
y1 = n[1]
x2 = n[2]
y2 = n[3]
Sam_x = x1 == x2
Sam_y = y1 == y2
if Sam_x:
	print(x1 + abs(y1 - y2), end=' ')
	print(y1, end=' ')
	print(x1 + abs(y1 - y2), end=' ')
	print(y2)
elif Sam_y:
	print(x1, end=' ')
	print(y1 + abs(x1 - x2), end=' ')
	print(x2, end=' ')
	print(y1 + abs(x1 - x2))
elif abs(x1 - x2) == abs(y1 - y2):
	print(x1, end=' ')
	print(y2, end=' ')
	print(x2, end=' ')
	print(y1)
else:
	print(-1)


import math
(x1, y1, x2, y2) = [int(n) for n in input().split()]

def dist(x1, x2, y1, y2):
	d = math.sqrt((x1 - x2) ** 2 + (y2 - y1) ** 2)
	return d
f = 1
d = dist(x1, x2, y1, y2)
if x1 == x2:
	(x3, y3) = (x2 + d, y2)
	(x4, y4) = (x1 + d, y1)
elif y2 == y1:
	(x3, y3) = (x2, y2 + d)
	(x4, y4) = (x1, y1 + d)
else:
	(x3, y3) = (x1, y2)
	(x4, y4) = (x2, y1)
	s1 = dist(x1, x3, y1, y3)
	s2 = dist(x2, x4, y2, y4)
	s3 = dist(x3, x2, y3, y2)
	s4 = dist(x1, x4, y1, y4)
	if s1 != (s2 or s3 or s4) or s2 != (s3 or s4) or s3 != s4:
		f = 0
if f == 1:
	print('%d %d %d %d' % (x3, y3, x4, y4))
else:
	print(-1)


(x, y, x1, y1) = list(map(int, input().split()))
if x == x1:
	if y > y1:
		print(x + y - y1, y1, x + y - y1, y)
	elif y1 > y:
		print(x + y1 - y, y, x + y1 - y, y1)
elif y == y1:
	if x > x1:
		print(x1, y + x - x1, x, y + x - x1)
	elif x1 > x:
		print(x, y + x1 - x, x1, y + x1 - x)
elif abs(x - x1) == abs(y - y1):
	print(x, y1, x1, y)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().strip().split())
deltaX = x2 - x1
deltaY = y2 - y1
if deltaX == 0:
	x3 = x1 + deltaY
	x4 = x1 + deltaY
	y3 = y1
	y4 = y2
elif deltaY == 0:
	y3 = y1 + deltaX
	y4 = y1 + deltaX
	x3 = x1
	x4 = x2
elif deltaY / deltaX in (1, -1):
	x3 = x1
	x4 = x2
	y3 = y2
	y4 = y1
else:
	print(-1)
	exit()
print(x3, y3, x4, y4)


(x1, y1, x2, y2) = map(int, input().split())
delta_x = abs(x1 - x2)
delta_y = abs(y1 - y2)
if x1 == x2:
	print(x1 + delta_y, y1, x2 + delta_y, y2)
elif y1 == y2:
	print(x1, y1 + delta_x, x2, y2 + delta_x)
elif delta_x / delta_y != 1:
	print(-1)
else:
	print(x1, y2, x2, y1)


(a, b, c, d) = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
if a == c:
	print(str(abs(b - d) + a) + ' ' + str(b) + ' ' + str(abs(b - d) + c) + ' ' + str(d))
elif b == d:
	print(str(a) + ' ' + str(abs(a - c) + b) + ' ' + str(c) + ' ' + str(abs(a - c) + d))
elif abs(a - c) != abs(b - d):
	print(-1)
else:
	print(str(a) + ' ' + str(d) + ' ' + str(c) + ' ' + str(b))


(x, y, a, b) = list(map(int, input().split()))
delta_x = a - x
delta_y = b - y
if delta_x == 0:
	delta_x = delta_y
if delta_y == 0:
	delta_y = delta_x
if abs(delta_x) != abs(delta_y):
	print(-1)
else:
	l = [(x, y), (x + delta_x, y), (x, y + delta_y), (x + delta_x, y + delta_y)]
	for i in l:
		if i != (x, y) and i != (a, b):
			print(i[0], i[1], end=' ')


from math import sqrt, ceil
(x1, y1, x2, y2) = map(int, input().split())
(x3, y3, x4, y4) = [0] * 4
dist = sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
if x1 == x2 or y1 == y2:
	dist = int(dist)
	if x1 == x2:
		x3 = x1 + dist
		x4 = x3
		y3 = y1
		y4 = y2
	if y1 == y2:
		x3 = x1
		x4 = x2
		y3 = y1 + dist
		y4 = y3
	print(x3, y3, x4, y4)
elif abs(x1 - x2) == abs(y1 - y2):
	dist = int(dist) // sqrt(2)
	if x1 < x2:
		x3 = x1
		x4 = x2
		y3 = y2
		y4 = y1
	else:
		x4 = x1
		x3 = x2
		y4 = y2
		y3 = y1
	print(x3, y3, x4, y4)
else:
	print(-1)


import sys
input = lambda : sys.stdin.readline().strip('\r\n')
(x1, y1, x2, y2) = map(int, input().split())
a = abs(x1 - x2)
b = abs(y1 - y2)
if a == b:
	print(x1, y2, x2, y1)
elif a == 0:
	print(x1 + b, y1, x2 + b, y2)
elif b == 0:
	print(x1, y1 + a, x2, y2 + a)
else:
	print(-1)


data = input().split()
(X1, Y1, X2, Y2) = (int(data[0]), int(data[1]), int(data[2]), int(data[3]))
(X3, Y3, X4, Y4) = (0, 0, 0, 0)
if X1 != X2 and Y1 != Y2 and (abs(X2 - X1) != abs(Y2 - Y1)):
	print('-1')
	exit
else:
	if X1 == X2:
		(X3, Y3, X4, Y4) = (X1 + abs(Y2 - Y1), Y1, X2 + abs(Y2 - Y1), Y2)
	elif Y1 == Y2:
		(X3, Y3, X4, Y4) = (X1, Y1 + abs(X2 - X1), X2, Y2 + abs(X2 - X1))
	else:
		(X3, Y3, X4, Y4) = (X1, Y2, X2, Y1)
	print(X3, Y3, X4, Y4)


s = input().split()
a = s[0:2]
b = s[2:4]
for i in range(2):
	a[i] = int(a[i])
	b[i] = int(b[i])
if a[0] - b[0] == 0:
	r = abs(int(a[1] - b[1]))
	print(a[0] + r, a[1], b[0] + r, b[1])
elif a[1] - b[1] == 0:
	r = abs(int(a[0] - b[0]))
	print(a[0], a[1] + r, b[0], b[1] + r)
elif abs(a[0] - b[0]) == abs(a[1] - b[1]):
	print(a[0], b[1], b[0], a[1])
else:
	print(-1)


from sys import stdin

def main():
	(x1, y1, x2, y2) = map(int, stdin.readline().strip().split())
	sx = abs(x1 - x2)
	sy = abs(y1 - y2)
	if not sx and sy:
		x1 += sy
		x2 += sy
		print(x1, y1, x2, y2)
	elif sx and (not sy):
		y1 += sx
		y2 += sx
		print(x1, y1, x2, y2)
	elif sx == sy:
		print(x1, y2, x2, y1)
	else:
		print(-1)
main()


masstr1 = input().split(' ')
x1 = int(masstr1[0])
y1 = int(masstr1[1])
x2 = int(masstr1[2])
y2 = int(masstr1[3])
if x1 == x2 or y1 == y2 or abs(x1 - x2) == abs(y1 - y2):
	if x1 == x2:
		d = abs(y2 - y1)
		x3 = x1 + d
		x4 = x2 + d
		if x3 >= 1000 or x4 >= 1000:
			x3 = x1 - d * 2
			x4 = x2 - d * 2
		y3 = y1
		y4 = y2
		print(x3, ' ', y3, ' ', x4, ' ', y4)
	elif y1 == y2:
		d = abs(x2 - x1)
		y3 = y1 + d
		y4 = y2 + d
		if y3 >= 1000 or y4 >= 1000:
			y3 = y1 - d * 2
			y4 = y2 - d * 2
		x3 = x1
		x4 = x2
		print(x3, ' ', y3, ' ', x4, ' ', y4)
	elif abs(x1 - x2) == abs(y1 - y2):
		d = abs(x1 - x2)
		x3 = x1
		x4 = x2
		y3 = y2
		y4 = y1
		print(x3, ' ', y3, ' ', x4, ' ', y4)
else:
	print(-1)


a = [int(x) for x in input().split()]
if a[0] == a[2] or a[1] == a[3] or abs(a[0] - a[2]) == abs(a[1] - a[3]):
	if abs(a[0] - a[2]) == abs(a[1] - a[3]):
		dis1 = a[2] - a[0]
		dis2 = a[3] - a[1]
		x1 = a[0] + dis1
		y1 = a[1]
		x2 = a[0]
		y2 = a[1] + dis2
		print(x2, y2, x1, y1)
	elif a[0] == a[2]:
		dis = a[3] - a[1]
		x1 = dis + a[0]
		y1 = dis + a[1]
		x2 = dis + a[0]
		y2 = a[1]
		print(x2, y2, x1, y1)
	else:
		dis = a[2] - a[0]
		x1 = dis + a[0]
		y1 = dis + a[1]
		x2 = a[0]
		y2 = dis + a[1]
		print(x2, y2, x1, y1)
else:
	print(-1)


arr = input().split()
arr = list(map(int, arr))
if arr[0] - arr[2] != 0:
	slope = (arr[1] - arr[3]) / (arr[0] - arr[2])
else:
	slope = 0.333
arrr = [1, 0, -1, 0.333]
if slope not in arrr:
	print(-1)
elif slope == 1 or slope == -1:
	print(str(arr[0]) + ' ' + str(arr[3]) + ' ' + str(arr[2]) + ' ' + str(arr[1]))
elif slope == 0.333:
	print(str(abs(arr[3] - arr[1]) + arr[0]) + ' ' + str(arr[1]) + ' ' + str(abs(arr[3] - arr[1]) + arr[0]) + ' ' + str(arr[3]))
else:
	print(str(arr[0]) + ' ' + str(abs(arr[2] - arr[0]) + arr[1]) + ' ' + str(arr[2]) + ' ' + str(abs(arr[2] - arr[0]) + arr[1]))


(x1, y1, x2, y2) = map(int, input().split())
a = x2 - x1
b = y2 - y1
flag = False
if abs(a) == abs(b):
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	print(x3, y3, x4, y4)
	flag = True
if a == 0 and b != 0 and (flag == False):
	x3 = x1 + abs(b)
	y3 = y1
	x4 = x2 + abs(b)
	y4 = y2
	print(x3, y3, x4, y4)
	flag = True
if b == 0 and a != 0 and (flag == False):
	x3 = x1
	y3 = y1 + abs(a)
	x4 = x2
	y4 = y2 + abs(a)
	print(x3, y3, x4, y4)
	flag = True
if not flag:
	print(-1)


import sys
(x1, y1, x2, y2) = map(int, sys.stdin.readline().split())
if abs(x1 - x2) == 0:
	d = abs(y1 - y2)
	print(x1 + d, y1, x1 + d, y2, sep=' ')
elif abs(y1 - y2) == 0:
	d = abs(x1 - x2)
	print(x1, y1 + d, x2, y2 + d, sep=' ')
elif abs(x1 - x2) == abs(y1 - y2):
	print(x1, y2, x2, y1, sep=' ')
else:
	print('-1')


points = list(map(int, input().split()))
newpoints = None
if points[2] - points[0] == 0:
	distance = abs(points[3] - points[1])
	newpoints = (points[0] + distance, points[1], points[2] + distance, points[3])
elif points[3] - points[1] == 0:
	distance = abs(points[2] - points[0])
	newpoints = (points[0], points[1] + distance, points[2], points[3] + distance)
elif abs(points[3] - points[1]) == abs(points[2] - points[0]):
	newpoints = (points[0], points[3], points[2], points[1])
else:
	newpoints = -1
if type(newpoints) is int:
	print(newpoints)
else:
	print(' '.join((str(x) for x in newpoints)))


(x1, y1, x2, y2) = [int(x) for x in input().split()]
l = abs(x1 - x2)
m = abs(y2 - y1)
if x1 == x2:
	print(x1 + m, y1, x2 + m, y2)
elif y1 == y2:
	print(x1, y1 + l, x2, y2 + l)
elif l != m:
	print(-1)
else:
	print(x1, y2, x2, y1)


import math
(x1, y1, x2, y2) = [int(x) for x in input().split()]
(a, b) = (0, 0)
if x1 == x2:
	side = abs(y2 - y1)
	if -1000 <= x1 + side <= 1000:
		a = x1 + side
		b = x1 + side
		print(a, y2, b, y1)
	elif -1000 <= x1 - side <= 1000:
		a = x1 - side
		b = x1 - side
		print(a, y2, b, y1)
	else:
		print(-1)
elif y1 == y2:
	side = abs(x2 - x1)
	if -1000 <= y1 + side <= 1000:
		a = y1 + side
		b = y1 + side
		print(x1, b, x2, a)
	elif -1000 <= y1 - side <= 1000:
		a = y1 - side
		b = y1 - side
		print(x1, b, x2, a)
	else:
		print(-1)
elif abs(y2 - y1) == abs(x2 - x1):
	side = abs(x2 - x1)
	if y1 > y2:
		print(x1, y1 - side, x2, y2 + side)
	else:
		print(x1, y1 + side, x2, y2 - side)
else:
	print(-1)


import math
coordinates = input().split()
x1 = int(coordinates[0])
y1 = int(coordinates[1])
x2 = int(coordinates[2])
y2 = int(coordinates[3])
if x1 == x2:
	y3 = y1
	y4 = y2
	x3 = x1 + abs(y1 - y2)
	x4 = x2 + abs(y1 - y2)
	print(x3, y3, x4, y4)
elif y1 == y2:
	x3 = x1
	x4 = x2
	y3 = y1 + abs(x1 - x2)
	y4 = y2 + abs(x1 - x2)
	print(x3, y3, x4, y4)
elif abs(x1 - x2) == abs(y1 - y2):
	x3 = x1
	x4 = x2
	y3 = y2
	y4 = y1
	print(x3, y3, x4, y4)
else:
	print(-1)


z = input
mod = 10 ** 9 + 7
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0:
			return 0
	return 1
for _ in range(1):
	(a, b, c, d) = map(int, z().split())
	l = abs(a - c)
	m = abs(b - d)
	if l == 0:
		print(a + m, b, c + m, d)
	elif m == 0:
		print(a, b + l, c, d + l)
	elif m != l:
		print(-1)
	else:
		print(a, d, c, b)


import math, sys
(x1, y1, x2, y2) = map(int, input().split())
x3 = x4 = y3 = y4 = 0
if x1 == x2:
	x3 = x1 + abs(y2 - y1)
	y3 = y1
	x4 = x2 + abs(y2 - y1)
	y4 = y2
elif y1 == y2:
	y3 = y1 + abs(x2 - x1)
	x3 = x1
	y4 = y2 + abs(x2 - x1)
	x4 = x2
else:
	d = int((pow(x2 - x1, 2) + pow(y2 - y1, 2)) // 2)
	if abs((y2 - y1) / (x2 - x1)) != 1:
		print(-1)
		sys.exit(0)
	else:
		d = int(d)
		if y1 > y2:
			(y1, y2) = (y2, y1)
			(x1, x2) = (x2, x1)
		x3 = x1
		y3 = y2
		x4 = x2
		y4 = y1
print(x3, y3, x4, y4)


from math import sqrt, floor, ceil
(x1, y1, x2, y2) = map(int, input().split())
p1 = []
p2 = []
f = 1
if x1 == x2:
	d = abs(y1 - y2)
	p1.append(x1 + d)
	p1.append(y1)
	p2.append(x2 + d)
	p2.append(y2)
elif y1 == y2:
	d = abs(x1 - x2)
	p1.append(x1)
	p1.append(y1 + d)
	p2.append(x2)
	p2.append(y2 + d)
else:
	d = abs(y2 - y1) ** 2 + abs(x2 - x1) ** 2
	d = d / 2
	if floor(sqrt(d)) != ceil(sqrt(d)):
		f = 0
	elif floor(sqrt(d)) == ceil(sqrt(d)):
		d = int(sqrt(abs(d)))
		if abs(y2 - y1) != d or abs(x2 - x1) != d:
			f = 0
		else:
			p1.append(x2)
			p1.append(y1)
			p2.append(x1)
			p2.append(y2)
if f == 0:
	print(-1)
else:
	print(*p1, end=' ')
	print(*p2)


s = [int(n) for n in input().split()]
x1 = s[0]
y1 = s[1]
x2 = s[2]
y2 = s[3]
x3 = x4 = y3 = y4 = int()
l = 0
if x1 == x2 and y1 != y2:
	l = 1
elif y1 == y2 and x1 != x2:
	l = 2
elif abs((y1 - y2) / (x1 - x2)) == 1:
	l = 3
else:
	l = 0
	print(-1)
if l == 1:
	p = abs(y1 - y2)
	x3 = x1 + p
	x4 = x1 + p
	y3 = y1
	y4 = y2
	print('{} {} {} {}'.format(x3, y3, x4, y4))
elif l == 2:
	p = abs(x1 - x2)
	x3 = x1
	x4 = x2
	y3 = y1 + p
	y4 = y1 + p
	print('{} {} {} {}'.format(x3, y3, x4, y4))
elif l == 3:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	print('{} {} {} {}'.format(x3, y3, x4, y4))


t = input()
temp = t.split()
x1 = int(temp[0])
y1 = int(temp[1])
x2 = int(temp[2])
y2 = int(temp[3])
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
elif x1 == x2:
	a = abs(y1 - y2)
	x3 = x1 + a
	x4 = x2 + a
	y3 = y1
	y4 = y2
	print(x3, y3, x4, y4)
elif y1 == y2:
	a = abs(x1 - x2)
	x3 = x1
	x4 = x2
	y3 = y1 + a
	y4 = y2 + a
	print(x3, y3, x4, y4)
elif x1 != x2 and y1 != y2:
	a = abs(x1 - x2)
	x3 = x1
	x4 = x2
	y3 = y2
	y4 = y1
	print(x3, y3, x4, y4)


(x1, y1, x2, y2) = [int(x) for x in input().strip().split()]
(p1, p2) = ([x1, y1], [x2, y2])
(pts1, pts2) = ([], [])
if p1[0] == p2[0] or p1[1] == p2[1] or abs(p1[0] - p2[0]) == abs(p1[1] - p2[1]):
	dis = max(abs(p1[0] - p2[0]), abs(p1[1] - p2[1]))
	move = [(0, dis), (0, -dis), (dis, 0), (-dis, 0), (dis, dis), (-dis, dis), (dis, -dis), (-dis, -dis)]
	for i in move:
		pts1.append((x1 + i[0], y1 + i[1]))
		pts2.append((x2 + i[0], y2 + i[1]))
	pts1 = set(pts1)
	pts2 = set(pts2)
	ans = list(pts1.intersection(pts2))
	if p1[0] == p2[0] or p1[1] == p2[1]:
		one = ans[0]
		two = 0
		for i in ans[1:]:
			if (one[0] == i[0] or one[1] == i[1]) and dis == max(abs(one[0] - i[0]), abs(one[1] - i[1])):
				two = i
				break
		print(one[0], one[1], two[0], two[1])
	else:
		one = ans[0]
		two = 0
		for i in ans[1:]:
			if abs(one[0] - i[0]) == abs(one[1] - i[1]):
				two = i
				break
		print(one[0], one[1], two[0], two[1])
else:
	print(-1)


(x1, y1, x2, y2) = [int(x) for x in input().split()]
a = []
if x1 == x2:
	a += [x1 + y2 - y1]
	a += [y1]
	a += [a[0]]
	a += [y2]
	print(' '.join(map(str, a)))
elif y1 == y2:
	a += [x1]
	a += [y1 + x2 - x1]
	a += [x2]
	a += [a[1]]
	print(' '.join(map(str, a)))
elif abs(x1 - x2) == abs(y1 - y2):
	a += [x1]
	a += [y2]
	a += [x2]
	a += [y1]
	print(' '.join(map(str, a)))
else:
	print('-1')


(x1, y1, x2, y2) = map(int, input().rstrip().split())
f = 1
if y1 == y2:
	side = (abs(x2 - x1) ** 2 + abs(y2 - y1) ** 2) ** 0.5
	side = int(side)
	(x3, y3) = (x1, y1 + side)
	(x4, y4) = (x2, y2 + side)
	if y3 < -1000 or y3 > 1000 or y4 < -1000 or (y4 > 1000):
		(x3, y3) = (x1, y1 - side)
		(x4, y4) = (x2, y2 - side)
	if y3 < -1000 or y3 > 1000 or y4 < -1000 or (y4 > 1000):
		f = -1
elif x1 == x2:
	side = (abs(x2 - x1) ** 2 + abs(y2 - y1) ** 2) ** 0.5
	side = int(side)
	(x3, y3) = (x2 + side, y2)
	(x4, y4) = (x1 + side, y1)
	if x3 < -1000 or x3 > 1000 or x4 < -1000 or (x4 > 1000):
		(x3, y3) = (x2 - side, y2)
		(x4, y4) = (x1 - side, y1)
	if x3 < -1000 or x3 > 1000 or x4 < -1000 or (x4 > 1000):
		f = -1
else:
	(x3, y3) = (x2, y1)
	(x4, y4) = (x1, y2)
	b = (abs(x3 - x1) ** 2 + abs(y3 - y1) ** 2) ** 0.5
	p = (abs(x3 - x2) ** 2 + abs(y3 - y2) ** 2) ** 0.5
	if p != b:
		f = -1
if f == -1:
	print(-1)
else:
	print(x3, y3, x4, y4)


import math
(x1, y1, x2, y2) = input().split()
x1 = int(x1)
x2 = int(x2)
y1 = int(y1)
y2 = int(y2)
x3 = 0
y3 = 0
x4 = 0
y4 = 0
xdiff = x1 - x2
ydiff = y1 - y2
square = True
if x1 == x2:
	dist = abs(y2 - y1)
	(x3, y3, x4, y4) = (x1 + dist, y1, x2 + dist, y2)
elif y1 == y2:
	dist = abs(x2 - x1)
	(x3, y3, x4, y4) = (x1, y1 + dist, x2, y2 + dist)
else:
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
if xdiff != 0 and ydiff != 0 and (abs(xdiff) != abs(ydiff)):
	print(-1)
else:
	print(x3, y3, x4, y4)


def solution():
	(x1, y1, x2, y2) = map(int, input().split())
	if x1 == x2:
		distance = abs(y1 - y2)
		print(str(x1 + distance) + ' ' + str(y1) + ' ' + str(x2 + distance) + ' ' + str(y2))
		return
	if y1 == y2:
		distance = abs(x1 - x2)
		print(str(x1) + ' ' + str(y1 + distance) + ' ' + str(x2) + ' ' + str(y2 + distance))
		return
	if abs(x1 - x2) == abs(y1 - y2):
		print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))
		return
	print(-1)
solution()


in_line = input().split()
x1 = int(in_line[0])
y1 = int(in_line[1])
x2 = int(in_line[2])
y2 = int(in_line[3])
x3 = y3 = x4 = y4 = 0
if x1 == x2:
	y3 = y1
	y4 = y2
	ydelta = abs(y1 - y2)
	x3 = x1 + ydelta
	x4 = x1 + ydelta
	print('%d %d %d %d' % (x3, y3, x4, y4))
	exit()
if y1 == y2:
	x3 = x1
	x4 = x2
	xdelta = abs(x1 - x2)
	y3 = y1 + xdelta
	y4 = y1 + xdelta
	print('%d %d %d %d' % (x3, y3, x4, y4))
	exit()
dx = abs(x1 - x2)
dy = abs(y1 - y2)
if dx != dy:
	print('-1')
	exit()
x4 = x2
y4 = y1
x3 = x1
y3 = y2
print('%d %d %d %d' % (x3, y3, x4, y4))
exit()


def get_result():
	(x1, y1, x2, y2) = [int(val) for val in input().split()]
	if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
		return -1
	if x1 == x2:
		a = abs(y2 - y1)
		return ' '.join(map(str, [x1 + a, y1, x2 + a, y2]))
	if y1 == y2:
		a = abs(x2 - x1)
		return ' '.join(map(str, [x1, y1 + a, x2, y2 + a]))
	return ' '.join(map(str, [x1, y2, x2, y1]))
print(get_result())


(x1, y1, x2, y2) = [int(x) for x in input().split()]
xmin = min(x1, x2)
xmax = max(x1, x2)
ymin = min(y1, y2)
ymax = max(y1, y2)
if xmin == xmax and ymin == ymax:
	print(-1)
elif xmin == xmax:
	a = ymax - ymin
	print(xmin + a, ymin, xmin + a, ymax)
elif ymin == ymax:
	a = xmax - xmin
	print(xmin, ymin + a, xmax, ymin + a)
elif ymax - ymin != xmax - xmin:
	print(-1)
else:
	print(x2, y1, x1, y2)


cor = list(map(int, input().split()))
x = cor[2] - cor[0]
y = cor[3] - cor[1]
if x == 0:
	x3 = cor[0] + y
	y3 = cor[1]
	x4 = cor[0] + y
	y4 = cor[1] + y
	out = str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4)
	print(out)
elif y == 0:
	x3 = cor[0]
	y3 = cor[1] + x
	x4 = cor[0] + x
	y4 = cor[1] + x
	out = str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4)
	print(out)
else:
	x3 = cor[0] + x
	y3 = cor[1]
	x4 = cor[0]
	y4 = cor[1] + y
	x_1 = x3 - cor[0]
	y_1 = y4 - cor[1]
	if abs(x_1) == abs(y_1):
		out = str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4)
	else:
		out = -1
	print(out)


from math import *
(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	dist = abs(y1 - y2)
	y3 = y1
	y4 = y2
	x3 = x1 + dist
	x4 = x1 + dist
	print(x3, y3, x4, y4)
elif y1 == y2:
	dist = abs(x1 - x2)
	x3 = x1
	x4 = x2
	y3 = y1 + dist
	y4 = y1 + dist
	print(x3, y3, x4, y4)
elif abs(x1 - x2) != abs(y1 - y2):
	print('-1')
elif (y1 - y2) // (x1 - x2) == 1:
	x3 = max(x1, x2)
	y3 = min(y1, y2)
	x4 = min(x1, x2)
	y4 = max(y1, y2)
	print(x3, y3, x4, y4)
else:
	x3 = max(x1, x2)
	y3 = max(y1, y2)
	x4 = min(x1, x2)
	y4 = min(y1, y2)
	print(x3, y3, x4, y4)


def main():
	(x1, y1, x2, y2) = map(int, input().split())
	x = abs(x1 - x2)
	y = abs(y1 - y2)
	a = max(x, y)
	if x == 0:
		print(x1 + a, y1, x2 + a, y2, sep=' ')
	elif y == 0:
		print(x1, y1 + a, x2, y2 + a, sep=' ')
	elif x != y:
		print(-1)
	elif x != 0 and y != 0:
		print(x1, y2, x2, y1)
	else:
		print(-1)
main()


(x1, y1, x2, y2) = map(int, input().split())
x_dist = abs(x1 - x2)
y_dist = abs(y1 - y2)
if x_dist == 0:
	print(x1 + y_dist, y1, x2 + y_dist, y2)
elif y_dist == 0:
	print(x1, y1 + x_dist, x2, y2 + x_dist)
elif x_dist == y_dist:
	print(x1, y2, x2, y1)
else:
	print(-1)


(x1, y1, x2, y2) = [int(i) for i in input().split()]
a = abs(x1 - x2)
b = abs(y1 - y2)
if a != b and a != 0 and (b != 0):
	out2 = -1
else:
	if x1 != x2 and y1 != y2:
		out = [x1, y2, x2, y1]
	elif x1 == x2:
		out = [x1 + b, y1, x2 + b, y2]
	elif y1 == y2:
		out = [x1, y1 + a, x2, y2 + a]
	out1 = [str(i) for i in out]
	out2 = ' '.join(out1)
print(out2)


(x1, y1, x2, y2) = map(int, input().split())
if (x1 != x2 and y1 != y2) and abs(x2 - x1) == abs(y2 - y1):
	(x3, y3) = (x1, y2)
	(x4, y4) = (x2, y1)
	print(x3, y3, x4, y4)
elif x1 == x2:
	diff = abs(y2 - y1)
	if x1 + diff <= 1000:
		(x3, y3) = (x1 + diff, y1)
		(x4, y4) = (x1 + diff, y2)
		print(x3, y3, x4, y4)
	elif x1 - diff >= 1000:
		(x3, y3) = (x1 - diff, y1)
		(x4, y4) = (x1 - diff, y2)
		print(x3, y3, x4, y4)
	else:
		print(-1)
elif y1 == y2:
	diff = abs(x2 - x1)
	if y1 + diff <= 1000:
		(x3, y3) = (x1, y1 + diff)
		(x4, y4) = (x2, y1 + diff)
		print(x3, y3, x4, y4)
	elif y1 - diff >= 1000:
		(x3, y3) = (x1, y1 - diff)
		(x4, y4) = (x2, y2 - diff)
		print(x3, y3, x4, y4)
	else:
		print(-1)
else:
	print(-1)


def pashamak(x1, y1, x2, y2):
	if x1 == y1 and x2 == y2:
		points = [x1, y2, x2, y1]
		print(points[0], points[1], points[2], points[3])
	elif x1 == x2:
		points = [x1 + y2 - y1, y1, x2 + y2 - y1, y2]
		print(points[0], points[1], points[2], points[3])
	elif y1 == y2:
		points = [x1, y1 + x2 - x1, x2, y2 + x2 - x1]
		print(points[0], points[1], points[2], points[3])
	elif abs(x2 - x1) == abs(y2 - y1):
		points = [x1, y1 + y2 - y1, x2, y2 - (y2 - y1)]
		print(points[0], points[1], points[2], points[3])
	else:
		print(-1)
(x1, y1, x2, y2) = [int(x) for x in input().split() if x]
pashamak(x1, y1, x2, y2)


(x1, y1, x2, y2) = [int(x) for x in input().split()]
if x1 == x2 and y1 == y2:
	print(-1)
elif x1 != x2 and y1 != y2:
	if abs(x1 - x2) == abs(y1 - y2):
		print(x1, y2, x2, y1)
	else:
		print('-1')
elif x1 == x2:
	a = abs(y1 - y2)
	print(x1 + a, y1, x2 + a, y2)
else:
	a = abs(x1 - x2)
	print(x1, y1 + a, x2, y2 + a)


(x1, y1, x2, y2) = map(int, input().split())
l = abs(x2 - x1)
m = abs(y2 - y1)
if x1 == x2:
	print(x1 + m, y1, x2 + m, y2)
elif y1 == y2:
	print(x1, y1 + l, x2, y2 + l)
elif l != m:
	print(-1)
else:
	print(x1, y2, x2, y1)


def fun(x1, y1, x2, y2):
	if x1 == x2:
		x3 = x1 + abs(y2 - y1)
		x4 = x3
		y3 = y1
		y4 = y2
	elif y1 == y2:
		x3 = x1
		x4 = x2
		y3 = y1 + abs(x2 - x1)
		y4 = y3
	else:
		slope = abs((y2 - y1) / (x2 - x1))
		if slope == 1:
			x3 = x1
			x4 = x2
			y3 = y2
			y4 = y1
		else:
			print(-1)
			return
	print(x3, y3, x4, y4)
(x1, y1, x2, y2) = list(map(lambda x: int(x), input().split()))
fun(x1, y1, x2, y2)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	edge = abs(y1 - y2)
	x3 = x4 = x1 + edge
	y3 = y1
	y4 = y2
	if not (-1000 <= x3 <= 1000 and -1000 <= x4 <= 1000 and (-1000 <= y3 <= 1000) and (-1000 <= y4 <= 1000)):
		x3 = x4 = x1 - edge
		if not (-1000 <= x3 <= 1000 and -1000 <= x4 <= 1000 and (-1000 <= y3 <= 1000) and (-1000 <= y4 <= 1000)):
			print(-1)
		else:
			print(x3, y3, x4, y4)
	else:
		print(x3, y3, x4, y4)
elif y1 == y2:
	edge = abs(x1 - x2)
	y3 = y4 = y1 + edge
	x3 = x1
	x4 = x2
	if not (-1000 <= x3 <= 1000 and -1000 <= x4 <= 1000 and (-1000 <= y3 <= 1000) and (-1000 <= y4 <= 1000)):
		y3 = y4 = y1 - edge
		if not (-1000 <= x3 <= 1000 and -1000 <= x4 <= 1000 and (-1000 <= y3 <= 1000) and (-1000 <= y4 <= 1000)):
			print(-1)
		else:
			print(x3, y3, x4, y4)
	else:
		print(x3, y3, x4, y4)
else:
	slope = (y1 - y2) / (x1 - x2)
	if slope != 1 and slope != -1:
		print(-1)
	else:
		x3 = x1
		x4 = x2
		y3 = y2
		y4 = y1
		if not (-1000 <= x3 <= 1000 and -1000 <= x4 <= 1000 and (-1000 <= y3 <= 1000) and (-1000 <= y4 <= 1000)):
			print(-1)
		else:
			print(x3, y3, x4, y4)


input_points = input().split(' ')
x1 = int(input_points[0])
y1 = int(input_points[1])
x2 = int(input_points[2])
y2 = int(input_points[3])
if x1 != x2 and y1 != y2:
	if abs(x2 - x1) != abs(y2 - y1):
		print(-1)
		exit()
if x1 == x2:
	side_length = abs(y2 - y1)
	print('{} {} {} {}'.format(x1 - side_length, y1, x2 - side_length, y2))
elif y1 == y2:
	side_length = abs(x2 - x1)
	print('{} {} {} {}'.format(x1, y1 - side_length, x2, y2 - side_length))
elif x2 > x1 and y2 > y1:
	side_length = x2 - x1
	print('{} {} {} {}'.format(x1 + side_length, y1, x2 - side_length, y2))
else:
	side_length = x2 - x1
	print('{} {} {} {}'.format(x2 - side_length, y2, x1 + side_length, y1))


import sys

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

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
(x1, y1, x2, y2) = rinput()
if x1 == x2:
	h = max(y1, y2) - min(y1, y2)
	print(x1 + h, y1, x2 + h, y2)
elif y1 == y2:
	h = max(x1, x2) - min(x1, x2)
	print(x1, y1 + h, x2, y2 + h)
elif max(y1, y2) - min(y1, y2) == max(x1, x2) - min(x1, x2):
	print(x1, y2, x2, y1)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
l = abs(x1 - x2)
m = abs(y1 - y2)
r = []
if l == 0:
	x3 = x1 + m
	x4 = x2 + m
	r.append(x3)
	r.append(y1)
	r.append(x4)
	r.append(y2)
	for i in range(len(r)):
		print(r[i], end=' ')
elif m == 0:
	y3 = y1 + l
	y4 = y2 + l
	r.append(x1)
	r.append(y3)
	r.append(x2)
	r.append(y4)
	for i in range(len(r)):
		print(r[i], end=' ')
elif l != m:
	print('-1')
else:
	r.append(x1)
	r.append(y2)
	r.append(x2)
	r.append(y1)
	for i in range(len(r)):
		print(r[i], end=' ')


(x1, y1, x2, y2) = input().split()
x1 = int(x1)
y1 = int(y1)
x2 = int(x2)
y2 = int(y2)
if x1 == x2:
	if y1 > y2:
		a = y1 - y2
	else:
		a = y2 - y1
	print(x1 + a, y1, x1 + a, y2)
elif y1 == y2:
	if x1 > x2:
		a = x1 - x2
	else:
		a = x2 - x1
	print(x1, y1 + a, x2, y1 + a)
elif x1 - x2 == y1 - y2 or x1 - x2 == y2 - y1:
	if x2 > x1:
		a = x2 - x1
		print(x1 + a, y1, x2 - a, y2)
	else:
		a = x1 - x2
		print(x1 - a, y1, x2 + a, y2)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
c = 0
if x1 == x2:
	mi = min(y1, y2)
	ma = max(y1, y2)
	l = ma - mi
	x3 = x1 + l
	x4 = x3
	y3 = y1
	y4 = y2
elif y1 == y2:
	mi = min(x1, x2)
	ma = max(x1, x2)
	l = ma - mi
	y3 = y1 + l
	y4 = y3
	x3 = x1
	x4 = x2
elif abs(x1 - x2) == abs(y1 - y2):
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
else:
	c = c + 1
	print(-1)
if c == 0:
	print(x3, y3, x4, y4)


import sys, collections, math

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
mod = 1000000007
(x1, y1, x2, y2) = get_ints()
if x1 != x2 and y1 != y2 and (abs(x2 - x1) != abs(y2 - y1)):
	print(-1)
elif y1 == y2:
	print(x2, y2 + abs(x1 - x2), x1, y1 + abs(x2 - x1))
elif x1 == x2:
	print(x1 + abs(y2 - y1), y1, x1 + abs(y2 - y1), y2)
else:
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = list(map(int, input().split()))
if x1 == x2 and y1 == y2:
	print(-1)
elif x1 == x2 and y1 != y2:
	l = max(y1, y2) - min(y1, y2)
	x = x1
	if x + l >= -1000 and x + l <= 1000:
		print(x + l, y1, x + l, y2)
	elif x - l >= -1000 and x - l <= 1000:
		print(x - l, y1, x - l, y2)
	else:
		print(-1)
elif x1 != x2 and y1 == y2:
	l = max(x1, x2) - min(x1, x2)
	y = y1
	if y + l >= -1000 and y + l <= 1000:
		print(x1, y + l, x2, y + l)
	elif y - l >= -1000 and y - l <= 1000:
		print(x1, y - l, x2, y - l)
	else:
		print(-1)
elif max(x1, x2) - min(x1, x2) == max(y1, y2) - min(y1, y2):
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	print(x3, y3, x4, y4)
else:
	print(-1)


[x1, y1, x2, y2] = [int(x) for x in input().split(' ')]
if x1 == x2:
	k = abs(y2 - y1)
	(x3, y3, x4, y4) = (x1 + k, y1, x2 + k, y2)
	print(x3, y3, x4, y4, sep=' ')
elif y1 == y2:
	k = abs(x2 - x1)
	(x3, y3, x4, y4) = (x1, y1 + k, x2, y2 + k)
	print(x3, y3, x4, y4, sep=' ')
elif abs(x2 - x1) != abs(y2 - y1):
	print('-1')
else:
	k = abs(x2 - x1)
	if y1 < y2:
		(x3, y3, x4, y4) = (x1, y1 + k, x2, y2 - k)
	else:
		(x3, y3, x4, y4) = (x1, y1 - k, x2, y2 + k)
	print(x3, y3, x4, y4, sep=' ')


(x1, y1, x2, y2) = [int(x) for x in input().split()]
a = abs(x2 - x1)
b = abs(y2 - y1)
side = 0
if a * b == 0:
	side = max(a, b)
elif a == b:
	side = a
else:
	print(-1)
	exit()
sides = []
sides.append([(x1 + side, y1), (x1, y1 + side), (x1 + side, y1 + side)])
sides.append([(x1 + side, y1), (x1, y1 - side), (x1 + side, y1 - side)])
sides.append([(x1 - side, y1), (x1, y1 - side), (x1 - side, y1 - side)])
sides.append([(x1 - side, y1), (x1, y1 + side), (x1 - side, y1 + side)])
for i in range(4):
	if (x2, y2) in sides[i]:
		k = sides[i]
for i in k:
	if i[0] == x2 and i[1] == y2:
		pass
	else:
		print(i[0], i[1], end=' ')


import math, os, sys
import string, re
import itertools, functools, operator
from collections import Counter

def inputint():
	return int(input())

def inputarray(func=int):
	return map(func, input().split())
(x1, y1, x2, y2) = inputarray()
if x1 == x2:
	print('%d %d %d %d' % (x1 + y2 - y1, y1, x2 + y2 - y1, y2))
elif y1 == y2:
	print('%d %d %d %d' % (x1, y1 + x2 - x1, x2, y2 + x2 - x1))
elif abs(y2 - y1) == abs(x2 - x1):
	print('%d %d %d %d' % (x2, y1, x1, y2))
else:
	print(-1)


(a, b, c, d) = map(int, input().split())
s1 = abs(a - c)
s2 = abs(b - d)
if s1 == s2:
	print(a, d, c, b)
elif s1 == 0:
	print(a + s2, b, c + s2, d)
elif s2 == 0:
	print(a, b - s1, c, d - s1)
else:
	print('-1')


s = [int(a) for a in input().split()]
x1 = s[0]
y1 = s[1]
x2 = s[2]
y2 = s[3]
if x1 == x2:
	dis = abs(y2 - y1)
	x3 = x1 + dis
	x4 = x3
	y3 = y1
	y4 = y2
	print(x3, y3, x4, y4, sep=' ')
elif y1 == y2:
	dis = abs(x2 - x1)
	y3 = y1 + dis
	y4 = y3
	x3 = x1
	x4 = x2
	print(x3, y3, x4, y4, sep=' ')
elif (y2 - y1) / (x2 - x1) != 1 and (y2 - y1) / (x2 - x1) != -1:
	print(-1)
else:
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
	print(x3, y3, x4, y4, sep=' ')


import sys, os
from math import sqrt, gcd, ceil, log, floor, sin, pi
from math import factorial as fact
from bisect import bisect, bisect_left
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
from itertools import permutations
input = sys.stdin.readline
read = lambda : list(map(int, input().strip().split()))
MOD = 10 ** 9 + 7

def main():
	(a, b, c, d) = read()
	(x, y) = (abs(a - c), abs(b - d))
	if x == 0:
		print(a + y, b, c + y, d)
	elif y == 0:
		print(a, b + x, c, d + x)
	elif x != 0 and y != 0 and (x == y):
		print(a, d, c, b)
	else:
		print(-1)
main()


x = list(map(int, input().split()))
if x[0] != x[2] and x[1] != x[3]:
	if abs(x[0] - x[2]) != abs(x[1] - x[3]):
		print(-1)
	else:
		print(x[0], x[3], x[2], x[1])
elif x[0] == x[2]:
	print(abs(x[1]) + abs(x[3]) + x[0], x[1], abs(x[1]) + abs(x[3]) + x[0], x[3])
elif x[1] == x[3]:
	length = abs(max(x[0], x[2]) - min(x[0], x[2]))
	print(x[0], length + x[1], x[2], length + x[1])


import sys
from math import *
input = sys.stdin.readline
RI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw = lambda : input().strip().split()
from collections import defaultdict as df
import heapq
infinite = float('inf')
(x1, y1, x2, y2) = RI()
if y2 - y1 == 0:
	d = abs(x2 - x1)
	print(str(x1) + ' ' + str(y1 + d) + ' ' + str(x2) + ' ' + str(y2 + d))
elif x2 - x1 == 0:
	d = abs(y2 - y1)
	print(str(x1 + d) + ' ' + str(y1) + ' ' + str(x2 + d) + ' ' + str(y2))
elif abs(x1 - x2) == abs(y2 - y1):
	print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))
else:
	print(-1)


p = [int(x) for x in input().split(' ')]
d1 = abs(p[0] - p[2])
d2 = abs(p[1] - p[3])
d = max(d1, d2)
if d2 == 0:
	print(p[0], p[1] + d, p[2], p[3] + d)
elif d1 == 0:
	print(p[0] + d, p[1], p[2] + d, p[3])
elif d1 == d2:
	x0 = min(p[0], p[2])
	y0 = min(p[1], p[3])
	if (p[0], p[1]) == (x0, y0) or (p[2], p[3]) == (x0, y0):
		print(x0, y0 + d, x0 + d, y0)
	else:
		print(x0, y0, x0 + d, y0 + d)
else:
	print(-1)


a = input().split()
x1 = int(a[0])
y1 = int(a[1])
x2 = int(a[2])
y2 = int(a[3])
dis = int(((x1 - x2) ** 2 + (y1 - y2) ** 2) ** (1 / 2))
p = 0
s = ''
if x1 - x2 == 0:
	s = str(x1 + dis) + ' ' + str(y1) + ' ' + str(x2 + dis) + ' ' + str(y2)
elif y1 - y2 == 0:
	s = str(x1) + ' ' + str(y1 + dis) + ' ' + str(x2) + ' ' + str(y2 + dis)
elif (x1 - x2) / (y1 - y2) == 1 or (x1 - x2) / (y1 - y2) == -1:
	dis = int(((x1 - x2) ** 2 + (y1 - y2) ** 2) ** (1 / 2) / 2 ** (1 / 2))
	if x1 < x2:
		s = str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1)
	else:
		s = str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1)
else:
	p == 6
	print(-1)
if p != 6:
	print(s)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
readint = lambda : int(sys.stdin.readline().rstrip('\r\n'))
readints = lambda : map(int, sys.stdin.readline().rstrip('\r\n').split())
readstr = lambda : sys.stdin.readline().rstrip('\r\n')
readstrs = lambda : map(str, sys.stdin.readline().rstrip('\r\n').split())
readarri = lambda : [int(_) for _ in sys.stdin.readline().rstrip('\r\n').split()]
readarrs = lambda : [str(_) for _ in sys.stdin.readline().rstrip('\r\n').split()]

def solve():
	(x1, y1, x2, y2) = readints()
	arr = sorted([[x1, y1], [x2, y2]])
	x1 = arr[0][0]
	x2 = arr[1][0]
	y1 = arr[0][1]
	y2 = arr[1][1]
	if x1 == x2:
		print(x1 + y2 - y1, y1, x2 + y2 - y1, y2)
	elif y1 == y2:
		print(x1, y1 + x2 - x1, x2, y2 + x2 - x1)
	elif x1 == y1 and x2 == y2:
		print(x1, y2, x2, y1)
	elif abs(x2 - x1) == abs(y2 - y1):
		if x1 < x2:
			print(x1, y2, x2, y1)
		else:
			print(x2, y1, x1, y2)
	else:
		print(-1)

def main():
	t = 1
	for _ in range(t):
		solve()
main()


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	d = abs(y1 - y2)
	print(x1 + d, y1, x2 + d, y2)
elif y1 == y2:
	d = abs(x1 - x2)
	print(x1, y1 + d, x2, y2 + d)
else:
	k1 = abs(x1 - x2)
	k2 = abs(y1 - y2)
	d = k1 * k1 + k2 * k2
	q = (d // 2) ** (1 / 2)
	if d % 2 == 0 and q == int(q):
		x3 = x1
		y3 = y2
		x4 = x2
		y4 = y1
		s1 = abs(x1 - x3) * abs(x1 - x3) + abs(y1 - y3) * abs(y1 - y3)
		s2 = abs(x1 - x4) * abs(x1 - x4) + abs(y1 - y4) * abs(y1 - y4)
		if s1 == s2:
			print(x3, y3, x4, y4)
		else:
			print(-1)
	else:
		print(-1)


import math
(x1, y1, x2, y2) = [int(x) for x in input().split()]
d = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
if x1 == x2:
	d = int(d)
	print(x1 + d, y1, x2 + d, y2)
elif y1 == y2:
	d = int(d)
	print(x1, y1 + d, x2, y2 + d)
elif abs(x2 - x1) == abs(y2 - y1):
	print(x1, y2, x2, y1)
else:
	print(-1)


(x1, y1, x2, y2) = (int(x) for x in input().split())
if x1 == x2:
	a = abs(y2 - y1)
	print(x1 + a, y1, x2 + a, y2)
	quit()
if y1 == y2:
	a = abs(x1 - x2)
	print(x1, y1 + a, x2, y2 + a)
	quit()
if abs(x1 - x2) == abs(y1 - y2):
	print(x1, y2, x2, y1)
	quit()
print(-1)


(x1, y1, x2, y2) = map(int, input().strip().split(' '))
if y1 == y2:
	p = abs(x1 - x2)
	print(x1, y1 + p, x2, y2 + p, end=' ')
elif x1 == x2:
	p = abs(y1 - y2)
	print(x1 + p, y1, x2 + p, y2, end=' ')
elif abs((y1 - y2) / (x1 - x2)) == 1:
	print(x1, y2, x2, y1, end=' ')
else:
	print(-1)


import math
b = []
a = list(map(int, input().split(' ')))[:4]
if a[0] == a[2]:
	side = abs(a[1] - a[3])
	b.append(a[0] + side)
	b.append(a[1])
	b.append(a[2] + side)
	b.append(a[3])
elif a[1] == a[3]:
	side = abs(a[0] - a[2])
	b.append(a[0])
	b.append(a[1] + side)
	b.append(a[2])
	b.append(a[3] + side)
else:
	b.append(a[0])
	b.append(a[3])
	b.append(a[2])
	b.append(a[1])
if a[0] != a[2] and a[1] != a[3] and (abs(a[0] - a[2]) != abs(a[1] - a[3])):
	print(-1)
else:
	print(*b)


import math
from collections import Counter
from functools import lru_cache
t = 1
for _ in range(t):
	(x1, y1, x2, y2) = [int(i) for i in input().split()]
	if x1 == x2:
		dist = abs(y2 - y1)
		(x3, x4) = (x1 + dist, x1 + dist)
		(y3, y4) = (y1, y2)
		print(x3, y3, x4, y4)
	elif y1 == y2:
		dist = abs(x2 - x1)
		(y3, y4) = (y1 + dist, y2 + dist)
		(x3, x4) = (x1, x2)
		print(x3, y3, x4, y4)
	else:
		(x3, y3) = (x2, y1)
		(x4, y4) = (x1, y2)
		t1 = abs(x1 - x3) + abs(y1 - y3)
		t2 = abs(x1 - x4) + abs(y1 - y4)
		t3 = abs(x2 - x3) + abs(y2 - y3)
		t4 = abs(x2 - x4) + abs(y2 - y4)
		if t1 == t2 == t3 == t4:
			print(x3, y3, x4, y4)
		else:
			print(-1)


(x1, y1, x2, y2) = map(int, input().split())
(first_x, first_y, sec_x, sec_y) = (0, 0, 0, 0)
if x1 != x2 and y1 != y2:
	if abs(x2 - x1) != abs(y2 - y1):
		print(-1)
	else:
		print(x1, y2, x2, y1)
elif x1 == x2:
	side = abs(y1 - y2)
	print(x1 + side, y1, x2 + side, y2)
elif y1 == y2:
	side = abs(x1 - x2)
	print(x1, y1 + side, x2, y2 + side)
else:
	print(-1)


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	(x1, y1, x2, y2) = In()
	if x1 == x2:
		s = abs(y1 - y2)
		print(x1 + s, y1, x2 + s, y2)
	elif y1 == y2:
		s = abs(x1 - x2)
		print(x1, y1 + s, x2, y2 + s)
	elif abs(x1 - x2) == abs(y1 - y2):
		print(x1, y2, x2, y1)
	else:
		print(-1)
main()


(x1, y1, x2, y2) = map(int, input().split())
if y1 == y2 and x1 != x2:
	side = abs(x1 - x2)
	(x3, y3) = (x1, y1 + side)
	(x4, y4) = (x2, y2 + side)
	print(x3, y3, x4, y4)
elif x1 == x2 and y1 != y2:
	side = abs(y1 - y2)
	(x3, y3) = (x1 + side, y1)
	(x4, y4) = (x2 + side, y2)
	print(x3, y3, x4, y4)
elif (y1 - y2) / (x1 - x2) == 1 or (y1 - y2) / (x1 - x2) == -1:
	(x3, y3) = (x1, y2)
	(x4, y4) = (x2, y1)
	print(x3, y3, x4, y4)
else:
	print(-1)


string = input('')
coords = string.split(' ')
(x1, y1) = coords[0:2:1]
(x1, y1) = (int(x1), int(y1))
(x2, y2) = coords[2::1]
(x2, y2) = (int(x2), int(y2))
sideLength = 0
if x1 == x2 or y1 == y2:
	result = str(x1 + abs(y1 - y2)) + ' ' + str(y1 + abs(x1 - x2)) + ' ' + str(x2 + abs(y1 - y2)) + ' ' + str(y2 + abs(x1 - x2))
	print(result)
	exit()
if abs(x1 - x2) != abs(y1 - y2):
	print('-1')
	exit()
result = str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1)
print(result)


def solve(x1, y1, x2, y2):
	if abs(x2 - x1) == abs(y2 - y1):
		print(x1, y2, x2, y1)
	elif x1 == x2:
		temp = y2 - y1 + x1
		print(temp, y1, temp, y2)
	elif y1 == y2:
		temp = x2 - x1 + y1
		print(x1, temp, x2, temp)
	else:
		print(-1)
(x1, y1, x2, y2) = map(int, input().split())
solve(x1, y1, x2, y2)


import math
(x1, y1, x2, y2) = map(int, input().split())
dis = math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))
if x1 > x2:
	temp = x1
	x1 = x2
	x2 = temp
	temp1 = y1
	y1 = y2
	y2 = temp1
if (x1 != x2 and y1 != y2) and x2 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print('-1')
else:
	if y1 == y2:
		a = abs(x1 - x2)
		y3 = y1 + a
		y4 = y1 + a
		x3 = x1
		x4 = x2
	if x1 == x2:
		a = abs(y1 - y2)
		x3 = x1 + a
		x4 = x1 + a
		y3 = y1
		y4 = y2
	elif abs(x2 - x1) == abs(y2 - y1):
		x3 = x1
		y3 = y2
		x4 = x2
		y4 = y1
	print(x3, y3, x4, y4, sep=' ')


def abs(x):
	if x > 0:
		return x
	else:
		return -x
(x1, y1, x2, y2) = map(int, input('').split())
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
elif x1 == x2:
	print(str(x1 + abs(y1 - y2)) + ' ' + str(y1) + ' ' + str(x2 + abs(y1 - y2)) + ' ' + str(y2))
elif y1 == y2:
	print(str(x1) + ' ' + str(y1 + abs(x1 - x2)) + ' ' + str(x2) + ' ' + str(y2 + abs(x1 - x2)))
else:
	print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))


A = input()
B = []
for i in A.split():
	B.append(int(i))
if B[0] == B[2]:
	print(B[0] + B[1] - B[3], B[1], B[0] + B[1] - B[3], B[3])
elif B[1] == B[3]:
	print(B[0], B[1] - B[2] + B[0], B[2], B[1] - B[2] + B[0])
elif abs(B[0] - B[2]) != abs(B[1] - B[3]):
	print(-1)
elif abs(B[0] - B[2]) == abs(B[1] - B[3]):
	print(B[0], B[3], B[2], B[1])


(x1, y1, x2, y2) = [int(i) for i in input().split()]
if x1 != x2 and y1 != y2:
	if abs(x1 - x2) != abs(y1 - y2) or x1 > 1000 or x2 > 1000 or (y1 > 1000) or (y2 > 1000):
		print(-1)
	else:
		print(x1, y2, x2, y1)
elif x1 != x2:
	print(x1, y1 + abs(x1 - x2), x2, y2 + abs(x1 - x2))
elif y1 != y2:
	print(x1 + abs(y1 - y2), y1, x2 + abs(y1 - y2), y2)


(x1, y1, x2, y2) = map(int, input().split())
deltax = abs(x1 - x2)
deltay = abs(y1 - y2)
if deltax != deltay and deltax != 0 and (deltay != 0):
	print(-1)
else:
	size = max(deltax, deltay)
	x = min(x1, x2)
	y = min(y1, y2)
	t = [(x, y), (x + size, y), (x, y + size), (x + size, y + size)]
	t.remove((x1, y1))
	t.remove((x2, y2))
	print(' '.join(map(lambda x: str(x[0]) + ' ' + str(x[1]), t)))


from sys import *
from math import *

def main():
	(x1, y1, x2, y2) = list(map(int, input().split()))
	(x3, y3, x4, y4) = [0] * 4
	if x1 == x2:
		d = abs(y1 - y2)
		(x3, y3, x4, y4) = (x1 + d, y1, x2 + d, y2)
		print(x3, y3, x4, y4)
	elif y1 == y2:
		d = abs(x1 - x2)
		(x3, y3, x4, y4) = (x1, y1 + d, x2, y2 + d)
		print(x3, y3, x4, y4)
	elif abs(x1 - x2) == abs(y1 - y2):
		(x3, y3, x4, y4) = (x1, y2, x2, y1)
		print(x3, y3, x4, y4)
	else:
		print(-1)
main()


(x1, y1, x2, y2) = map(int, input().split())
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
elif x1 == x2:
	x11 = x1 + abs(y1 - y2)
	x22 = x2 + abs(y1 - y2)
	print(x11, y1, x22, y2)
elif y1 == y2:
	y11 = y1 + abs(x1 - x2)
	y22 = y2 + abs(x1 - x2)
	print(x1, y11, x2, y22)
else:
	print(x1, y2, x2, y1)


import math
(x1, y1, x2, y2) = [int(i) for i in input().split()]
if y1 == y2:
	d = math.sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2))
	print(x1, int(y1 + d), x2, int(y2 + d))
elif x1 == x2:
	d = math.sqrt(pow(x1 - x2, 2) + pow(y1 - y2, 2))
	print(int(x1 + d), y1, int(x2 + d), y2)
elif not (abs((x2 - x1) / (y2 - y1)) == 1 or abs((x1 - x2) / (y1 - y2)) == 1):
	print('-1')
else:
	print(x1, y2, x2, y1)


import math
(x1, y1, x2, y2) = map(int, input().split())
slope = -999
if x2 - x1 != 0:
	slope = (y2 - y1) / (x2 - x1)
if slope == 0:
	print(x1, int(y1 + (x2 - x1)), x2, int(y2 + (x2 - x1)))
elif slope == 1:
	diagonal = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
	side = diagonal / math.sqrt(2)
	side = math.ceil(side)
	if y1 > y2:
		temp = y1
		y1 = y2
		y2 = temp
		temp = x1
		x1 = x2
		x2 = temp
	print(x1, int(y1 + side), x2, y1)
elif x2 - x1 == 0:
	side = y2 - y1
	print(int(x1 + side), y1, int(x2 + side), y2)
elif slope == -1:
	diagonal = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
	side = diagonal / math.sqrt(2)
	side = math.ceil(side)
	if y2 > y1:
		temp = y1
		y1 = y2
		y2 = temp
		temp = x1
		x1 = x2
		x2 = temp
	print(x1, int(y1 - side), x2, int(y2 + side))
else:
	print(-1)


thelist = input()
then = thelist.split()
x_1 = int(then[0])
y_1 = int(then[1])
x_2 = int(then[2])
y_2 = int(then[3])
thistrue = 'true'
if x_1 == x_2:
	x_3 = x_1 + (y_2 - y_1)
	y_3 = y_1
	x_4 = x_2 + (y_2 - y_1)
	y_4 = y_2
elif y_1 == y_2:
	y_3 = y_1 + (x_2 - x_1)
	x_3 = x_1
	y_4 = y_2 + (x_2 - x_1)
	x_4 = x_2
elif abs(y_1 - y_2) == abs(x_1 - x_2):
	x_3 = x_1
	y_3 = y_2
	x_4 = x_2
	y_4 = y_1
else:
	thistrue = 'false'
if thistrue == 'true':
	print(str(x_3) + ' ' + str(y_3) + ' ' + str(x_4) + ' ' + str(y_4))
else:
	print('-1')


(x1, y1, x2, y2) = [int(x) for x in input().split()]
if x1 == x2:
	c = y1 - y2
	print(x1 + c, y1, x2 + c, y2)
elif y1 == y2:
	c = x1 - x2
	print(x1, y1 + c, x2, y2 + c)
elif abs(x1 - x2) == abs(y1 - y2):
	c = abs(x1 - x2)
	x3 = min(x1, x2)
	y3 = min(y1, y2)
	if x3 == x1 and y3 == y1 or (x3 == x2 and y3 == y2):
		print(x3 + c, y3, x3, y3 + c)
	else:
		print(x3, y3, x3 + c, y3 + c)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
distance = None
if x1 == x2:
	distance = y2 - y1
	print(x1 + distance, y1, x1 + distance, y2)
elif y1 == y2:
	distance = x2 - x1
	print(x1, y1 + distance, x2, y1 + distance)
elif abs(y1 - y2) == abs(x1 - x2):
	print(x1, y2, x2, y1)
else:
	print(-1)


a = input()
b = a.split()
c = int(b[0])
d = int(b[1])
e = int(b[2])
g = int(b[3])
if c == e:
	print(c + abs(d - g), d, e + abs(d - g), g)
if d == g:
	print(c, d + abs(c - e), e, g + abs(c - e))
if c != e and d != g and (abs(c - e) != abs(d - g)):
	print(-1)
if c != e and d != g and (abs(c - e) == abs(d - g)):
	print(c, g, e, d)


(x1, y1, x2, y2) = input().split(' ')
x1 = int(x1)
y1 = int(y1)
x2 = int(x2)
y2 = int(y2)
if x1 - x2 != 0 and y1 - y2 != 0 and (abs(x1 - x2) != abs(y1 - y2)):
	print('-1')
	exit(0)
side = 0
if x1 - x2 == 0:
	side = abs(y1 - y2)
	print(x1 + side, y1, x2 + side, y2)
elif y1 - y2 == 0:
	side = abs(x1 - x2)
	print(x1, y1 + side, x2, y2 + side)
else:
	print(x1, y2, x2, y1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	s = abs(y1 - y2)
	print(x1 + s, y1, x1 + s, y2)
elif y1 == y2:
	s = abs(x1 - x2)
	print(x1, y1 + s, x2, y1 + s)
else:
	s = abs(x1 - x2)
	t = abs(y1 - y2)
	if s != t:
		print(-1)
	else:
		print(x1, y2, x2, y1)


def inp():
	return map(int, stdin.readline().split())

def euclidean(a, b, c, d):
	return sqrt((a - c) ** 2 + (b - d) ** 2)
from sys import *
from math import *
(x1, y1, x2, y2) = inp()
(dis1, dis2) = (abs(x1 - x2), abs(y1 - y2))
if x1 == x2:
	print(x1 + (y2 - y1), y1, x2 + (y2 - y1), y2)
elif y1 == y2:
	print(x1, y1 + (x2 - x1), x2, y2 + (x2 - x1))
elif dis1 == dis2:
	print(x1, y2, x2, y1)
else:
	print(-1)


x = input().split(' ')
x1 = int(x[0])
x2 = int(x[2])
y1 = int(x[1])
y2 = int(x[3])
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
elif x1 == x2:
	print(str(x1 + abs(y1 - y2)) + ' ' + str(y1) + ' ' + str(x2 + abs(y1 - y2)) + ' ' + str(y2))
elif y1 == y2:
	print(str(x1) + ' ' + str(y1 + abs(x1 - x2)) + ' ' + str(x2) + ' ' + str(y2 + abs(x1 - x2)))
else:
	print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))


from collections import Counter
import math
(a, b, c, d) = map(int, input().split())
if a == c:
	print(a + d - b, b, c + d - b, d)
elif b == d:
	print(a, b + c - a, c, d + c - a)
elif abs(c - a) == abs(d - b):
	print(c, b, a, d)
else:
	print('-1')


(a, b, c, d) = map(int, input().split())
if a != c and b != d and (abs(d - b) != abs(c - a)) or (a == c and b == d):
	print(-1)
elif a == c:
	x = d - b
	l = [str(a + x), str(b), str(c + x), str(d)]
	print(' '.join(l))
elif b == d:
	x = c - a
	l = [str(a), str(b + x), str(c), str(d + x)]
	print(' '.join(l))
else:
	x = abs(c - a)
	if b < d:
		print(str(a) + ' ' + str(b + x) + ' ' + str(c) + ' ' + str(d - x))
	else:
		print(str(a) + ' ' + str(b - x) + ' ' + str(c) + ' ' + str(d + x))


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
(x1, y1, x2, y2) = mInt()
if x1 == x2 and y1 != y2:
	print(x1 + abs(y2 - y1), y1, x1 + abs(y2 - y1), y2)
elif x1 != x2 and y1 == y2:
	print(x1, y2 + abs(x1 - x2), x2, y2 + abs(x1 - x2))
elif x1 != x2 and y1 != y2 and (abs(x2 - x1) == abs(y2 - y1)):
	print(x1, y2, x2, y1)
else:
	print(-1)


s = input().split()
p1 = (int(s[0]), int(s[1]))
p2 = (int(s[2]), int(s[3]))
if p1[0] == p2[0]:
	print(str(p1[0] + abs(p1[1] - p2[1])), s[1], str(p1[0] + abs(p1[1] - p2[1])), s[3])
elif p1[1] == p2[1]:
	print(s[0], str(p1[1] + abs(p1[0] - p2[0])), s[2], str(p1[1] + abs(p1[0] - p2[0])))
elif abs(p1[0] - p2[0]) == abs(p1[1] - p2[1]):
	print(s[0], s[3], s[2], s[1])
else:
	print('-1')


def ii():
	return int(input())

def ss():
	return [x for x in input()]

def si():
	return [int(x) for x in input().split()]

def mi():
	return map(int, input().split())
(a1, a2, b1, b2) = mi()
if a1 == b1:
	if a1 + abs(a2 - b2) <= 1000:
		print(a1 + abs(a2 - b2), a2, a1 + abs(a2 - b2), b2)
	elif a1 - abs(a2 - b2) >= -1000:
		print(a1 - abs(a2 - b2), a2, a1 - abs(a2 - b2), b2)
	else:
		print(-1)
elif a2 == b2:
	if a2 + abs(a1 - b1) <= 1000:
		print(a1, a2 + abs(a1 - b1), b1, a2 + abs(a1 - b1))
	elif a2 - abs(a1 - b1) >= 1000:
		print(a1, a2 - abs(a1 - b1), b1, a2 - abs(a1 - b1))
	else:
		print(-1)
elif abs(a1 - a2) == abs(b1 - b2):
	print(a1, b2, b1, a2)
elif abs(a1 - b1) == abs(a2 - b2):
	print(a1, b2, b1, a2)
else:
	print(-1)


n = list(map(int, input().split()))
if n[2] - n[0] == 0 and n[3] - n[1] != 0:
	print(str(n[0] + (n[3] - n[1])), str(n[1]), str(n[2] + (n[3] - n[1])), str(n[3]))
elif (n[3] - n[1]) / (n[2] - n[0]) == 1:
	print(str(n[0]), str(n[1] + (n[2] - n[0])), str(n[2]), str(n[3] - (n[2] - n[0])))
elif n[3] - n[1] == 0 and n[2] - n[0] != 0:
	print(str(n[0]), str(n[1] + (n[2] - n[0])), str(n[2]), str(n[3] + (n[2] - n[0])))
elif (n[3] - n[1]) / (n[2] - n[0]) == -1:
	print(str(n[0]), str(n[1] - (n[2] - n[0])), str(n[2]), str(n[3] + (n[2] - n[0])))
else:
	print('-1')


x = list(map(int, input().split()))
x1 = x[0]
y1 = x[1]
x2 = x[2]
y2 = x[3]
x3 = 0
x4 = 0
y3 = 0
y4 = 0
check = False
if x1 == x2:
	x3 = x1 + abs(y1 - y2)
	y3 = y1
	x4 = x3
	y4 = y2
elif y1 == y2:
	x3 = x1
	x4 = x2
	y3 = y1 + abs(x1 - x2)
	y4 = y3
elif abs(x2 - x1) == abs(y2 - y1):
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
else:
	check = True
if check:
	print(-1)
else:
	print(x3, y3, x4, y4)


x = [int(x) for x in input().split()]
x1 = x[0]
y1 = x[1]
x2 = x[2]
y2 = x[3]
if x1 - x2 == y1 - y2 or x1 - x2 == y2 - y1:
	print(x1, y2, x2, y1)
elif x1 == x2 and y1 != y2:
	x3 = y2 - y1 + x1
	print(x3, y1, x3, y2)
elif y1 == y2 and x1 != x2:
	y3 = x2 - x1 + y1
	print(x1, y3, x2, y3)
else:
	print(-1)


arr = list(map(int, input().split()))
(first, second) = (arr[:2], arr[2:])
(x, y) = (abs(first[0] - second[0]), abs(first[1] - second[1]))
if x == 0 or y == 0:
	if x == 0:
		side = y
		if first[0] + side <= 100:
			print(first[0] + side, first[1], second[0] + side, second[1])
		else:
			print(first[0] - side, first[1], second[0] - side, second[1])
	else:
		side = x
		if first[1] + side <= 100:
			print(first[0], first[1] + side, second[0], second[1] + side)
		else:
			print(first[0], first[1] - side, second[0], second[1] - side)
elif x == y:
	side = x
	slope = (second[1] - first[1]) // (second[0] - first[0])
	x_cord = min(first[0], second[0])
	y_cord = min(first[1], second[1])
	if slope == -1:
		print(x_cord, y_cord, x_cord + side, y_cord + side)
	else:
		print(x_cord + side, y_cord, x_cord, y_cord + side)
else:
	print(-1)


(x1, y1, x2, y2) = [int(i) for i in input().split()]
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
elif x1 == x2:
	print(f'{x1 + abs(y1 - y2):d} {y1:d} {x2 + abs(y1 - y2):d} {y2:d}')
elif y1 == y2:
	print(f'{x1:d} {y1 + abs(x1 - x2):d} {x2:d} {y2 + abs(x1 - x2):d}')
else:
	print(f'{x1:d} {y2:d} {x2:d} {y1:d}')


(x1, y1, x2, y2) = list(map(int, input().split()))
if abs(x1 - x2) == abs(y1 - y2):
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	print(x3, y3, x4, y4)
	quit()
if x1 == x2:
	jarak = abs(y1 - y2)
	x3 = jarak + x1
	y3 = y1
	x4 = jarak + x2
	y4 = y2
	print(x3, y3, x4, y4)
	quit()
if y1 == y2:
	jarak = abs(x1 - x2)
	x3 = x1
	y3 = jarak + y1
	x4 = x2
	y4 = jarak + y2
	print(x3, y3, x4, y4)
	quit()
if x1 - x2 != y1 - y2:
	print(-1)
	quit()


import atexit
import io
import sys
import bisect
_I_B = sys.stdin.read().splitlines()
input = iter(_I_B).__next__
_O_B = io.StringIO()
sys.stdout = _O_B

@atexit.register
def write():
	sys.__stdout__.write(_O_B.getvalue())

def main():
	(x1, y1, x2, y2) = map(int, input().split())
	if x1 == x2:
		d = abs(y1 - y2)
		print(x1 + d, y1, x2 + d, y2)
	elif y1 == y2:
		d = abs(x1 - x2)
		print(x1, y1 + d, x2, y2 + d)
	elif abs(x1 - x2) == abs(y1 - y2):
		d = abs(x1 - x2)
		if x2 < x1:
			(x1, x2) = (x2, x1)
			(y1, y2) = (y2, y1)
		if y1 > y2:
			print(x1, y1 - d, x2, y2 + d)
		else:
			print(x1, y1 + d, x2, y2 - d)
	else:
		print(-1)
main()


import math
l = list(map(int, input().split()))
(x1, y1, x2, y2) = (l[0], l[1], l[2], l[3])
l = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
if x2 - x1 == 0:
	print('%d %d %d %d' % (x1 + l, y1, x2 + l, y2))
elif y2 - y1 == 0:
	print('%d %d %d %d' % (x1, y1 + l, x2, y2 + l))
elif abs(x2 - x1) != abs(y2 - y1):
	print(-1)
else:
	a = int(math.sqrt(2) * (l / 2))
	if (y2 - y1) // (x2 - x1) > 0:
		xmin = min(x2, x1)
		ymin = min(y2, y1)
		print('%d %d %d %d' % (xmin + a, ymin, xmin, ymin + a))
	else:
		(xmin, ymin) = (min(x1, x2), max(y1, y2))
		print('%d %d %d %d' % (xmin, ymin - a, xmin + a, ymin))


import sys
(x1, y1, x2, y2) = list(map(int, input().split()))
if x1 == x2 or y1 == y2:
	if x1 == x2:
		d = y2 - y1
		x3 = x1 + d
		y3 = y1
		x4 = x2 + d
		y4 = y2
	elif y1 == y2:
		d = x2 - x1
		x3 = x1
		y3 = y1 + d
		x4 = x2
		y4 = y2 + d
else:
	d = x2 - x1
	d2 = y2 - y1
	if abs(d) != abs(d2):
		print(-1)
		sys.exit()
	x3 = x1 + d
	y3 = y1
	x4 = x1
	y4 = y1 + d2
mass = [x3, y3, x4, y4]
if 1001 in mass or -1001 in mass:
	print(-1)
else:
	print(*mass)


import os
import sys
from io import BytesIO, IOBase
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def main():
	try:
		(x1, y1, x2, y2) = invr()
		(x3, y3, x4, y4) = (0, 0, 0, 0)
		if x1 == x2:
			x3 = x1 + abs(y1 - y2)
			y3 = y1
			x4 = x2 + abs(y1 - y2)
			y4 = y2
		elif y1 == y2:
			x3 = x1
			y3 = y1 + abs(x1 - x2)
			x4 = x2
			y4 = y2 + abs(x1 - x2)
		elif abs(x1 - x2) != abs(y1 - y2):
			print('-1')
			exit()
		elif abs(x1 - x2) == abs(y1 - y2):
			x3 = x2
			y3 = y1
			x4 = x1
			y4 = y2
		print(x3, y3, x4, y4)
	except Exception as e:
		raise e
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from math import fabs
a = list(map(int, input().split()))
if a[0] == a[2]:
	b = int(fabs(a[1] - a[3]))
	if a[0] + b <= 1000:
		print(a[0] + b, a[1], a[0] + b, a[3])
	elif a[0] - b >= -1000:
		print(a[0] - b, a[1], a[0] - b, a[3])
	else:
		print(-1)
elif a[1] == a[3]:
	b = int(fabs(a[0] - a[2]))
	if a[1] + b <= 1000:
		print(a[0], a[1] + b, a[2], a[1] + b)
	elif a[1] - b >= -1000:
		print(a[0], a[1] - b, a[2], a[1] - b)
	else:
		print(-1)
elif fabs(a[0] - a[2]) == fabs(a[1] - a[3]):
	print(a[0], a[3], a[2], a[1])
else:
	print(-1)


from math import ceil, sqrt
(x1, y1, x2, y2) = input().split(' ')
x1 = int(x1)
x2 = int(x2)
y1 = int(y1)
y2 = int(y2)
status = False
if y2 == y1:
	d = x2 - x1
	x3 = x2
	x4 = x1
	y3 = y2 + d
	y4 = y1 + d
	flag = 1
elif x2 == x1:
	d = y2 - y1
	y3 = y2
	y4 = y1
	x3 = x2 + d
	x4 = x1 + d
	flag = 2
else:
	d = abs(y2 - y1)
	y3 = y2
	y4 = y1
	if x2 > x1:
		x3 = x2 - d
		x4 = x1 + d
	else:
		x3 = x2 + d
		x4 = x1 - d
	flag = 3
if flag == 1:
	if y4 - y3 == 0:
		status = True
elif flag == 2:
	if x4 - x3 == 0:
		status = True
elif flag == 3:
	if y3 > y4:
		d1 = sqrt((x4 - x2) ** 2 + (y4 - y2) ** 2)
		if d1 == d:
			status = True
	elif y4 > y3:
		d1 = sqrt((x3 - x1) ** 2 + (y3 - y1) ** 2)
		if d1 == d:
			status = True
if status:
	print(x3, y3, x4, y4)
else:
	print(-1)


a = [int(x) for x in input().split()]
l = max(abs(a[3] - a[1]), abs(a[2] - a[0]))
if a[0] == a[2]:
	a[0] += l
	a[2] += l
	for i in range(0, 4):
		print(a[i])
elif a[1] == a[3]:
	a[1] += l
	a[3] += l
	for i in range(0, 4):
		print(a[i])
elif abs(a[2] - a[0]) == abs(a[3] - a[1]):
	if a[0] < a[2]:
		a[0] += l
		a[2] -= l
	else:
		a[0] -= l
		a[2] += l
	for i in range(0, 4):
		print(a[i])
else:
	print('-1')


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	a = max(y1, y2) - min(y1, y2)
	x3 = x1 + a
	x4 = x3
	y3 = y1
	y4 = y2
	print(x3, ' ', y3, ' ', x4, ' ', y4)
elif y1 == y2:
	a = max(x1, x2) - min(x1, x2)
	y3 = y1 + a
	y4 = y3
	x3 = x1
	x4 = x2
	print(x3, ' ', y3, ' ', x4, ' ', y4)
else:
	a = max(x1, x2) - min(x1, x2)
	b = max(y1, y2) - min(y1, y2)
	if b != a:
		print('-1')
	else:
		x3 = x2
		x4 = x1
		y3 = y1
		y4 = y2
		print(x3, ' ', y3, ' ', x4, ' ', y4)


(x1, y1, x2, y2) = [int(x) for x in input().split()]
a = abs(y1 - y2)
b = abs(x1 - x2)
solution = True
if x1 == x2:
	x3 = x1 + a
	y3 = y1
	x4 = x3
	y4 = y2
elif y1 == y2:
	x3 = x1
	y3 = y1 + b
	x4 = x2
	y4 = y3
elif a == b:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
else:
	solution = False
if solution:
	print(x3, y3, x4, y4)
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	Dist = abs(y1 - y2)
	NewX = x1 + Dist
	print(NewX, y1, NewX, y2)
elif y1 == y2:
	Dist = abs(x1 - x2)
	NewY = y1 + Dist
	print(x1, NewY, x2, NewY)
elif abs(y2 - y1) / abs(x2 - x1) == 1:
	print(x1, y2, x2, y1)
else:
	print(-1)


import math
word = input().split(' ')
x1 = int(word[0])
y1 = int(word[1])
x2 = int(word[2])
y2 = int(word[3])
l = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
if x1 == x2:
	x3 = x2 + l
	y3 = y2
	x4 = x3
	y4 = y1
	print(str(int(x3)) + ' ' + str(int(y3)) + ' ' + str(int(x4)) + ' ' + str(int(y4)))
elif y1 == y2:
	y3 = y2 + l
	x3 = x2
	y4 = y3
	x4 = x1
	print(str(int(x3)) + ' ' + str(int(y3)) + ' ' + str(int(x4)) + ' ' + str(int(y4)))
elif abs(x1 - x2) != abs(y1 - y2):
	print('-1')
else:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	print(str(int(x3)) + ' ' + str(int(y3)) + ' ' + str(int(x4)) + ' ' + str(int(y4)))


a = input().split(' ')
x1 = int(a[0])
y1 = int(a[1])
x2 = int(a[2])
y2 = int(a[3])
if x1 - x2 == 0:
	print(str(x1 + abs(y1 - y2)) + ' ' + str(min(y1, y2)) + ' ' + str(x2 + abs(y1 - y2)) + ' ' + str(max(y1, y2)))
elif y1 - y2 == 0:
	print(str(min(x1, x2)) + ' ' + str(y1 + abs(x1 - x2)) + ' ' + str(max(x1, x2)) + ' ' + str(y1 + abs(x1 - x2)))
elif abs(x1 - x2) == abs(y1 - y2):
	if max(y1, y2) == y2 and max(x1, x2) == x2:
		print(str(min(x1, x2)) + ' ' + str(max(y1, y2)) + ' ' + str(max(x1, x2)) + ' ' + str(min(y2, y1)))
	elif max(x1, x2) == x1 and max(y1, y2) == y1:
		print(str(max(x1, x2)) + ' ' + str(min(y1, y2)) + ' ' + str(min(x1, x2)) + ' ' + str(max(y2, y1)))
	else:
		print(str(min(x1, x2)) + ' ' + str(min(y1, y2)) + ' ' + str(max(x1, x2)) + ' ' + str(max(y2, y1)))
else:
	print('-1')


import math
(aa, b, c, d) = map(int, input().split())
if aa == c:
	print(aa + d - b, b, aa + d - b, d)
elif b == d:
	print(aa, c - aa + b, c, c - aa + b)
elif round(abs(aa - c) * math.sqrt(2), 6) == round(math.sqrt((aa - c) ** 2 + (b - d) ** 2), 6):
	print(aa, d, c, b)
else:
	print(-1)


(x1, y1, x2, y2) = str(input()).split()
x1 = int(x1)
y1 = int(y1)
x2 = int(x2)
y2 = int(y2)
if x1 == x2 or y1 == y2:
	if x1 == x2 and y1 == y2:
		print(-1)
	elif x1 == x2:
		print(str(x1 + y1 - y2) + ' ' + str(y1) + ' ' + str(x2 + y1 - y2) + ' ' + str(y2))
	elif y1 == y2:
		print(str(x1) + ' ' + str(y1 + x1 - x2) + ' ' + str(x2) + ' ' + str(y2 + x1 - x2))
elif abs(x2 - x1) == abs(y2 - y1):
	print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))
else:
	print(-1)


import math
listin = input().split()
listUse = [int(i) for i in listin]
x1 = listUse[0]
y1 = listUse[1]
x2 = listUse[2]
y2 = listUse[3]
dist = int(math.sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2)))
if y2 - y1 == 0:
	x3 = x2
	y3 = y2 + dist
	x4 = x1
	y4 = y1 + dist
	print(x3, y3, x4, y4)
elif x2 - x1 == 0:
	x3 = x2 + dist
	y3 = y2
	x4 = x1 + dist
	y4 = y1
	print(x3, y3, x4, y4)
elif y2 - y1 != 0 and y2 - y1 == x2 - x1 or (y2 - y1 != 0 and y2 - y1 == (x2 - x1) * -1):
	x3 = x2
	y3 = y1
	x4 = x1
	y4 = y2
	print(x3, y3, x4, y4)
else:
	print(-1)


def pashmak(x1, y1, x2, y2):
	if x1 == x2:
		s = abs(y1 - y2)
		print(x1 + s, y1, x2 + s, y2)
		return
	elif y1 == y2:
		s = abs(x1 - x2)
		print(x1, y1 + s, x2, y2 + s)
		return
	elif abs(x2 - x1) == abs(y2 - y1):
		print(x1, y2, x2, y1)
		return
	else:
		print(-1)
		return
array = list(map(int, input().split(' ')))
pashmak(*array)


def main():
	(x1, y1, x2, y2) = [int(x) for x in input().split()]
	dist = abs(x1 - x2)
	dist = abs(y1 - y2) if not dist else dist
	if x1 != x2 and y1 != y2:
		if abs(y1 - y2) != abs(x1 - x2):
			print('-1')
		else:
			print(x1, y2, x2, y1)
	elif x1 == x2:
		print(x1 + dist, y1, x2 + dist, y2)
	else:
		print(x1, y1 + dist, x2, y2 + dist)
main()


n = [int(num) for num in input().split()]
x = [0, 0, 0, 0]
flag = 1
if n[0] == n[2]:
	d = abs(n[3] - n[1])
	x[1] = n[1]
	x[3] = n[3]
	if d + n[0] < 1001:
		x[0] = n[0] + d
		x[2] = n[0] + d
	elif n[0] - d > -1001:
		x[0] = n[0] - d
		x[2] = n[1] - d
	else:
		flag = 0
elif n[1] == n[3]:
	d = abs(n[2] - n[0])
	x[0] = n[0]
	x[2] = n[2]
	if n[1] + d < 1001:
		x[1] = n[1] + d
		x[3] = n[3] + d
	elif n[1] - d > -1001:
		x[1] = n[1] - d
		x[3] = n[3] - d
	else:
		flag = 0
else:
	x[0] = n[0]
	x[1] = n[3]
	x[2] = n[2]
	x[3] = n[1]
	if abs(n[2] - n[0]) != abs(n[3] - n[1]):
		flag = 0
if flag == 1:
	for i in x:
		print(i, end=' ')
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split(' '))
xDiff = x2 - x1
yDiff = y2 - y1
if xDiff != 0 and yDiff != 0:
	x3 = x1
	x4 = x2
	y3 = y2
	y4 = y1
elif xDiff != 0:
	x3 = x1
	x4 = x2
	y3 = y1 + xDiff
	y4 = y2 + xDiff
else:
	x3 = x1 + yDiff
	x4 = x2 + yDiff
	y3 = y1
	y4 = y2
if xDiff != 0 and yDiff != 0 and (abs(xDiff) != abs(yDiff)):
	print(-1)
else:
	print(x3, y3, x4, y4)


inp = input()
inp = inp.split()
x1 = int(inp[0])
y1 = int(inp[1])
x2 = int(inp[2])
y2 = int(inp[3])
x_diff = x1 - x2
y_diff = y1 - y2
if x_diff != 0 and y_diff != 0:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
elif x_diff != 0:
	x3 = x1
	y3 = y1 + abs(x_diff)
	x4 = x2
	y4 = y2 + abs(x_diff)
else:
	x3 = x1 + abs(y_diff)
	y3 = y1
	x4 = x2 + abs(y_diff)
	y4 = y2
if x_diff != 0 and y_diff != 0 and (abs(x_diff) != abs(y_diff)):
	print('-1')
else:
	print(str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4))


def findPosition(x1, y1, x2, y2):
	if x1 != x2 and y1 == y2:
		x3 = x1
		x4 = x2
		y3 = abs(x1 - x2) + y1
		y4 = abs(x1 - x2) + y1
	elif x1 != x2 and y1 != y2:
		x3 = x1
		x4 = x2
		y3 = y2
		y4 = y1
		if abs(x3 - x2) != abs(y2 - y4):
			print(-1)
			return
	elif x1 == x2 and y1 != y2:
		x3 = abs(y2 - y1) + x1
		x4 = abs(y2 - y1) + x1
		y3 = y1
		y4 = y2
	print(x3, y3, x4, y4)
temp = list(map(int, input().rstrip().split()))
x1 = temp[0]
y1 = temp[1]
x2 = temp[2]
y2 = temp[3]
findPosition(x1, y1, x2, y2)


from sys import stdin, stdout
(x1, y1, x2, y2) = map(int, stdin.readline().split())
if x1 == x2 and y1 == y2:
	stdout.write('-1\n')
elif x1 == x2:
	stdout.write('{} {} {} {}\n'.format(x1 + y2 - y1, y1, x1 + y2 - y1, y2))
elif y1 == y2:
	stdout.write('{} {} {} {}\n'.format(x1, y1 + x2 - x1, x2, y2 + x2 - x1))
elif abs(y1 - y2) == abs(x1 - x2):
	stdout.write('{} {} {} {}\n'.format(x1, y2, x2, y1))
else:
	stdout.write('-1\n')


import math
(x1, y1, x2, y2) = map(int, input().split())
(x3, x4, y3, y4) = (0, 0, 0, 0)
angle = 0
sol = -1
sidex = int(abs(x2 - x1))
sidey = int(abs(y2 - y1))
if sidey == 0 and sidex != 0:
	sol = 0
	x3 = x1
	x4 = x2
	y3 = y1 + sidex
	y4 = y2 + sidex
elif sidex == 0 and sidey != 0:
	sol = 0
	x3 = x1 + sidey
	x4 = x2 + sidey
	y3 = y1
	y4 = y2
elif sidex != 0 and abs(sidey / sidex) == 1:
	sol = 0
	x3 = x1
	x4 = x2
	y3 = y2
	y4 = y1
if not (x3 > -1001 and x3 < 1001 or (x4 > -1001 and x4 < 1001) or (y3 > -1001 and y3 < 1001) or (y4 > -1001 and y4 < 1001)):
	sol = -1
if sol != -1:
	print(x3, y3, x4, y4)
else:
	print(sol)


import math
import sys
co = list(map(int, input().split()))
(a, b, c, d) = (co[0], co[1], co[2], co[3])
if abs(a - c) != abs(b - d) and a != c and (b != d):
	print(-1)
	sys.exit()
elif a != c and b != d:
	print(a, d, c, b)
if a == c and b == d:
	print(-1)
	sys.exit()
if a == c:
	if a >= 0:
		print(a - abs(b - d), b, c - abs(b - d), d)
	else:
		print(a + abs(b - d), b, c + abs(b - d), d)
if b == d:
	if b >= 0:
		print(a, b - abs(c - a), c, d - abs(c - a))
	else:
		print(a, b + abs(c - a), c, d + abs(c - a))


coords = input().split()
x1 = int(coords[0])
y1 = int(coords[1])
x2 = int(coords[2])
y2 = int(coords[3])
if x1 == x2:
	s = abs(y1 - y2)
	x3 = s + x1
	y3 = y1
	x4 = s + x2
	y4 = y2
	print(x3, y3, x4, y4)
elif y1 == y2:
	s = abs(x1 - x2)
	x3 = x1
	y3 = s + y1
	x4 = x2
	y4 = s + y2
	print(x3, y3, x4, y4)
elif abs(x1 - x2) == abs(y1 - y2):
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	print(x3, y3, x4, y4)
else:
	print(-1)


(x, y, z, w) = map(int, input().split())
xx = abs(x - z)
yy = abs(y - w)
if x == z:
	print(x + yy, y, z + yy, w)
elif y == w:
	print(x, y + xx, z, w + xx)
elif xx != yy:
	print(-1)
else:
	print(x, w, z, y)


import math
from collections import defaultdict, Counter, deque
INF = float('inf')

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i ** 2 <= n:
		if n % i == 0:
			return i
		i += 1
	return n

def vars():
	return map(int, input().split())

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

def main():
	(x1, y1, x2, y2) = vars()
	if x1 == x2:
		h = abs(y1 - y2)
		print(x1 + h, y1, x2 + h, y2)
	elif y1 == y2:
		h = abs(x1 - x2)
		print(x1, y1 + h, x2, y2 + h)
	else:
		h1 = abs(y2 - y1)
		h2 = abs(x2 - x1)
		if h1 == h2:
			if y2 < y1:
				y3 = y1 - h1
				y4 = y2 + h1
			else:
				y3 = y1 + h1
				y4 = y2 - h1
			print(x1, y3, x2, y4)
		else:
			print(-1)
t = 1
for _ in range(t):
	main()


(x1, y1, x2, y2) = list(map(int, input().split()))
a = x1 - x2
b = y1 - y2
if x1 != x2 and y1 != y2 and (abs(a) != abs(b)):
	print(-1)
elif x1 == x2:
	print(x1 + abs(b), y1, x2 + abs(b), y2, sep=' ')
elif y1 == y2:
	print(x1, y1 + abs(a), x2, y2 + abs(a), sep=' ')
else:
	print(x1, y2, x2, y1, sep=' ')


(x1, y1, x2, y2) = [int(string) for string in input().split()]
dx = x2 - x1
dy = y2 - y1
if dy == 0:
	x3 = x1
	x4 = x2
	y3 = y1 + dx
	y4 = y2 + dx
	print('{0} {1} {2} {3}'.format(x3, y3, x4, y4))
elif dx == 0:
	x3 = x1 + dy
	x4 = x2 + dy
	y3 = y1
	y4 = y2
	print('{0} {1} {2} {3}'.format(x3, y3, x4, y4))
elif abs(dx) == abs(dy):
	x3 = x1
	x4 = x2
	y3 = y1 + dy
	y4 = y2 - dy
	print('{0} {1} {2} {3}'.format(x3, y3, x4, y4))
else:
	print(-1)


(x1, y1, x2, y2) = map(int, input().split())
l1 = [x1, y1]
l2 = [x2, y2]
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
elif x1 == x2:
	print(str(x1 + abs(y1 - y2)) + ' ' + str(y1) + ' ' + str(x2 + abs(y1 - y2)) + ' ' + str(y2))
elif y1 == y2:
	print(str(x1) + ' ' + str(y1 + abs(x1 - x2)) + ' ' + str(x2) + ' ' + str(y2 + abs(x1 - x2)))
else:
	print(str(x1) + ' ' + str(y2) + ' ' + str(x2) + ' ' + str(y1))


x = []
y = input()
x = y.split(' ')
x1 = int(x[0])
y1 = int(x[1])
x2 = int(x[2])
y2 = int(x[3])
xDiff = abs(x1 - x2)
yDiff = abs(y1 - y2)
if xDiff != 0 and yDiff != 0:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
elif xDiff != 0:
	x3 = x1
	x4 = x2
	y3 = y1 + xDiff
	y4 = y2 + xDiff
else:
	y3 = y1
	y4 = y2
	x3 = x1 + yDiff
	x4 = x2 + yDiff
if xDiff != 0 and yDiff != 0 and (xDiff != yDiff):
	print('-1')
else:
	print(x3, '', y3, '', x4, '', y4, '')


from collections import Counter
from collections import defaultdict
from collections import deque

def inpNums():
	return map(int, input().split())
(x1, y1, x2, y2) = inpNums()
if x1 == x2:
	sx = abs(y1 - y2)
	print(x1 + sx, y1, x2 + sx, y2)
elif y1 == y2:
	sy = abs(x1 - x2)
	print(x1, y1 + sy, x2, y2 + sy)
elif abs(y1 - y2) == abs(x1 - x2):
	print(x1, y2, x2, y1)
else:
	print(-1)


import sys

def data():
	return sys.stdin.readline().strip()

def sp():
	return map(int, data().split())

def l():
	return list(sp())
temp = l()
x1 = temp[0]
y1 = temp[1]
x2 = temp[2]
y2 = temp[3]
if x1 != x2 and y1 != y2 and (abs(x1 - x2) != abs(y1 - y2)):
	print(-1)
	exit()
elif x1 == x2:
	x3 = x1 + abs(y1 - y2)
	y3 = y1
	x4 = x2 + abs(y1 - y2)
	y4 = y2
	print(x3, y3, x4, y4)
elif y1 == y2:
	x3 = x1
	y3 = y1 + abs(x1 - x2)
	x4 = x2
	y4 = y2 + abs(x1 - x2)
	print(x3, y3, x4, y4)
else:
	print(x1, y2, x2, y1)


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

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

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations

def solve():
	(a, b, c, d) = map(int, input().split())
	if abs(a - c) != 0 and abs(b - d) != 0 and (abs(a - c) != abs(b - d)):
		print(-1)
	elif abs(a - c) == 0:
		print(a + abs(b - d), b, c + abs(b - d), d)
	elif abs(b - d) == 0:
		print(a, b + abs(a - c), c, d + abs(a - c))
	else:
		print(a, d, c, b)
for _ in range(1):
	solve()


m = input().split()
(x1, y1) = (int(m[0]), int(m[1]))
(x2, y2) = (int(m[2]), int(m[3]))
dx = x1 - x2
dy = y1 - y2
if abs(dx) != abs(dy) and dx * dy:
	print('-1')
	exit()
if dx * dy:
	(x3, y3) = (x2, y1)
	(x4, y4) = (x1, y2)
else:
	if dx == 0:
		(x3, y3) = (x1 - dy, y1)
		(x4, y4) = (x1 - dy, y2)
	if dy == 0:
		(x3, y3) = (x1, y1 - dx)
		(x4, y4) = (x2, y1 - dx)
print(x3, y3, x4, y4)


class CodeforcesTask459ASolution:

	def __init__(self):
		self.result = ''
		self.cords = []

	def read_input(self):
		self.cords = [int(x) for x in input().split(' ')]

	def process_task(self):
		x_dist = abs(self.cords[0] - self.cords[2])
		y_dist = abs(self.cords[1] - self.cords[3])
		top_right = [0, 0]
		top_left = [0, 0]
		bottom_right = [0, 0]
		bottom_left = [0, 0]
		if x_dist and y_dist:
			if x_dist == y_dist:
				a = x_dist
			else:
				self.result = '-1'
		elif x_dist:
			a = x_dist
		else:
			a = y_dist
		if not self.result:
			if x_dist and y_dist:
				bottom_left[0] = min(self.cords[0], self.cords[2])
				bottom_left[1] = min(self.cords[1], self.cords[3])
				bottom_right[0] = max(self.cords[0], self.cords[2])
				bottom_right[1] = min(self.cords[1], self.cords[3])
				top_left[0] = min(self.cords[0], self.cords[2])
				top_left[1] = max(self.cords[1], self.cords[3])
				top_right[0] = max(self.cords[0], self.cords[2])
				top_right[1] = max(self.cords[1], self.cords[3])
			elif x_dist:
				bottom_left[0] = min(self.cords[0], self.cords[2])
				bottom_left[1] = min(self.cords[1], self.cords[3])
				bottom_right[0] = max(self.cords[0], self.cords[2])
				bottom_right[1] = min(self.cords[1], self.cords[3])
				top_left[0] = min(self.cords[0], self.cords[2])
				top_left[1] = self.cords[1] + a
				top_right[0] = max(self.cords[0], self.cords[2])
				top_right[1] = self.cords[1] + a
			else:
				bottom_left[0] = self.cords[0] + a
				bottom_left[1] = min(self.cords[1], self.cords[3])
				bottom_right[0] = max(self.cords[0], self.cords[2])
				bottom_right[1] = min(self.cords[1], self.cords[3])
				top_left[0] = self.cords[0] + a
				top_left[1] = max(self.cords[1], self.cords[3])
				top_right[0] = max(self.cords[0], self.cords[2])
				top_right[1] = max(self.cords[1], self.cords[3])
			points = [x for x in [bottom_left, bottom_right, top_right, top_left] if not x in [self.cords[:2], self.cords[2:]]]
			p = []
			for po in points:
				p += po
			self.result = '{0} {1} {2} {3}'.format(*p)

	def get_result(self):
		return self.result
Solution = CodeforcesTask459ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


l = input().split()
x1 = int(l[0])
y1 = int(l[1])
x2 = int(l[2])
y2 = int(l[3])
if x1 == x2:
	len = abs(y1 - y2)
	x3 = x1 + len
	x4 = x2 + len
	print(x3, y1, x4, y2)
elif y1 == y2:
	len = abs(x1 - x2)
	y3 = y1 + len
	y4 = y2 + len
	print(x1, y3, x2, y4)
elif abs(x1 - x2) == abs(y1 - y2):
	print(x1, y2, x2, y1)
else:
	print('-1')


coordinates = input()
coordinates = coordinates.split(' ')
coordinates = [int(i) for i in coordinates]
x1 = coordinates[0]
y1 = coordinates[1]
x2 = coordinates[2]
y2 = coordinates[3]
ans = ''
if x1 == x2:
	side = abs(y1 - y2)
	x3 = x1 + side
	y3 = y1
	x4 = x2 + side
	y4 = y2
	ans += str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4)
	print(ans)
elif y1 == y2:
	side = abs(x1 - x2)
	x3 = x1
	y3 = y1 + side
	x4 = x2
	y4 = y2 + side
	ans += str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4)
	print(ans)
elif abs(x2 - x1) != abs(y2 - y1):
	print(-1)
else:
	x3 = x1
	y3 = y2
	x4 = x2
	y4 = y1
	ans += str(x3) + ' ' + str(y3) + ' ' + str(x4) + ' ' + str(y4)
	print(ans)


a = list(map(int, input().strip().split()))
x1 = a[0]
y1 = a[1]
x2 = a[2]
y2 = a[3]
if x1 == x2:
	print(x1 + y2 - y1, y1, end=' ')
	print(x2 + y2 - y1, y2)
elif y1 == y2:
	print(x1, y1 + x2 - x1, end=' ')
	print(x2, y2 + x2 - x1)
elif abs(x2 - x1) == abs(y2 - y1):
	print(x1, y2, end=' ')
	print(x2, y1)
else:
	print('-1')


(x1, y1, x2, y2) = map(int, input().split())
dif_x = x2 - x1
dif_y = y2 - y1
if dif_x != 0 and dif_y != 0:
	if abs(dif_x) != abs(dif_y):
		print(-1)
	else:
		print(x1 + dif_x, y1, x1, y1 + dif_y)
elif dif_x != 0:
	print(x1, y1 + dif_x, x2, y2 + dif_x)
else:
	print(x1 + dif_y, y1, x2 + dif_y, y2)


(x1, y1, x2, y2) = map(int, input().split())
if x1 == x2:
	x = x1 + abs(y1 - y2)
	print(x, y1, x, y2)
	quit()
if y1 == y2:
	y = y1 + abs(x1 - x2)
	print(x1, y, x2, y)
	quit()
if abs(x1 - x2) != abs(y1 - y2):
	print(-1)
	quit()
print(x1, y2, x2, y1)


l = [int(i) for i in input().split()]
if l[2] != l[0] and l[3] != l[1]:
	if abs(l[3] - l[1]) != abs(l[2] - l[0]):
		print(-1)
	else:
		(l[0], l[2]) = (l[2], l[0])
		print(' '.join((str(i) for i in l)))
else:
	if l[1] == l[3]:
		l[1] += l[2] - l[0]
		l[3] = l[1]
	elif l[0] == l[2]:
		l[0] += l[3] - l[1]
		l[2] = l[0]
	print(' '.join((str(i) for i in l)))