Problem:


Score : 200 points

Problem Statement

There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order.
(Assume that the positive x-axis points right, and the positive y-axis points up.)

Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).

Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Constraints

|x_1|,|y_1|,|x_2|,|y_2| \leq 100

(x_1,y_1) ≠ (x_2,y_2)

All values in input are integers.

Input

Input is given from Standard Input in the following format:

x_1 y_1 x_2 y_2

Output

Print x_3,y_3,x_4 and y_4 as integers, in this order.

Sample Input 1

0 0 0 1

Sample Output 1

-1 1 -1 0

(0,0),(0,1),(-1,1),(-1,0) is the four vertices of a square in counter-clockwise order.
Note that (x_3,y_3)=(1,1),(x_4,y_4)=(1,0) is not accepted, as the vertices are in clockwise order.

Sample Input 2

2 3 6 6

Sample Output 2

3 10 -1 7

Sample Input 3

31 -41 -59 26

Sample Output 3

-126 -64 -36 -131



Sample input:
0 0 0 1


Sample output:
-1 1 -1 0

Submission status: Wrong Answer

Solution code:
import heapq
def solve():
  x1,y1,x2,y2 = (int(i) for i in input().split())
  
  que = []
  que2 = []
  for i in range(-300,300):
    for j in range(-300,300):
      if (x2-x1)**2+(y2-y1)**2 == (i-x1)**2+(j-y1)**2:
        if (i,j) != (x1,y1) and  (i,j) != (x2,y2):
          que.append((i,j))
      if (x2-x1)**2+(y2-y1)**2 == (i-x2)**2+(j-y2)**2:
        if  (i,j) != (x1,y1) and  (i,j) != (x2,y2):
         que2.append((i,j))
        
  #define x3,y3
  while que2:
    (x3,y3) = heapq.heappop(que2)
    for i in range(len(que)):
      x4,y4 = que[i]
      if (x3-x2)**2+(y3-y2)**2 == (x4-x1)**2+(y4-y1)**2:
       if (x3-x4)**2+(y3-y4)**2 == (x2-x1)**2+(y2-y1)**2:
        if (x3-x1)**2+(y3-y1)**2 == (x2-x4)**2+(y2-y4)**2:
           print(x3,y3,x4,y4)
           exit()
  #print(que)
 #print(que2)			
solve()

Submission status: Wrong Answer

Solution code:
import numpy as np
A_B = np.array([input().split()], dtype=int).reshape(2,2)
A = A_B[0,:]
B = A_B[1,:]
diffX = abs(A-B)[0]
diffY = abs(A-B)[1]
if A[0]<B[0]:
    if A[1]>=B[1]:
        x_3 = B[0]+diffY
        y_3 = B[1]+diffX
        x_4 = A[0]+diffY
        y_4 = A[1]+diffX
    else:
        x_3 = B[0]-diffY
        y_3 = B[1]+diffX
        x_4 = A[0]-diffY
        y_4 = A[1]+diffX
elif A[0]>B[0]:
    if A[1]<=B[1]:
        x_3 = B[0]-diffY
        y_3 = B[1]-diffX
        x_4 = A[0]-diffY
        y_4 = A[1]-diffX
    else:
        x_3 = B[0]+diffY
        y_3 = B[1]-diffX
        x_4 = A[0]-diffY
        y_4 = A[1]-diffX
else:
    x_3 = B[0]-diffY
    y_3 = B[1]
    x_4 = A[0]-diffY
    y_4 = A[1]
        
print(x_3, y_3, x_4, y_4)

Submission status: Wrong Answer

Solution code:
import numpy as np
A_B = np.array([input().split()], dtype=int).reshape(2,2)
A = A_B[0,:]
B = A_B[1,:]
diffX = abs(A-B)[0]
diffY = abs(A-B)[1]
if A[0]<=B[0]:
    if A[1]>=B[1]:
        x_3 = B[0]+diffY
        y_3 = B[1]+diffX
        x_4 = A[0]+diffY
        y_4 = A[1]+diffX
    else:
        x_3 = B[0]-diffY
        y_3 = B[1]+diffX
        x_4 = A[0]-diffY
        y_4 = A[1]+diffX
else:
    if A[1]<=B[1]:
        x_3 = B[0]-diffY
        y_3 = B[1]-diffX
        x_4 = A[0]-diffY
        y_4 = A[1]-diffX
    else:
        x_3 = B[0]+diffY
        y_3 = B[1]-diffX
        x_4 = A[0]-diffY
        y_4 = A[1]-diffX
print(x_3, y_3, x_4, y_4)

Submission status: Wrong Answer

Solution code:
import numpy as np
A_B = np.array([input().split()], dtype=int).reshape(2,2)
A = A_B[0,:]
B = A_B[1,:]
diff = B-A
if diff[0]>=0:
    if diff[1]>=0:
        x_3 = B[0]-diff[1]
        y_3 = B[1]+diff[0]
    else:
        x_3 = B[0]-diff[0]
        y_3 = B[1]+diff[1]
else:
    if diff[1]>=0:
        x_3 = B[0]-diff[1]
        y_3 = B[1]+diff[0]
    else:
        x_3 = B[0]-diff[0]
        y_3 = B[1]+diff[1]
x_4 = x_3-diff[0]
y_4 = y_3-diff[1]
print(x_3, y_3, x_4, y_4)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if x1 <= x2 and y1 <= y2:
  x3 = x2 - b
  y3 = y2 + a
  x4 = x3 - a
  y4 = y3 - b
elif x1 <= x2 and y1 > y2:
  x3 = x2 + b
  y3 = y2 + a
  x4 = x3 - a
  y4 = y3 - b
elif x1 >= x2 and y1 <= y2:
  x3 = x2 - b
  y3 = y2 - a
  x4 = x3 + a
  y4 = y3 - b
else:
  x3 = x2 + b
  y3 = y2 - a
  x4 = x3 + a
  y4 = y3 + b
print("{} {} {} {}".format(x3, y3, x4, y4))

Submission status: Wrong Answer

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

print(a[2]-y,a[3]-x,a[0]-y,a[1]-x)

Submission status: Wrong Answer

Solution code:
from sys import stdin
x1,y1,x2,y2=[int(x) for x in stdin.readline().rstrip().split()]
x3=x2-abs(y1-y2)
y3=abs(x1-x2)+y2
x4=x1-abs(y1-y2)
y4=abs(x1-x2)+y1
print(x3,y3,x4,y4)

Submission status: Wrong Answer

Solution code:
def B():
    a = [int(i) for i in input().split()]
    x = [a[0], a[2]]
    y = [a[1], a[3]]

    if x[0] == x[1]:
        y.append(y[1])
        y.append(y[0])
        if y[0] > y[1]:
            x.append(x[0] + (y[0] - y[1]))
            x.append(x[0] + (y[0] - y[1]))
        else:
            x.append(x[0] - (y[1] - y[0]))
            x.append(x[0] - (y[1] - y[0]))
    else:
        x.append(x[1])
        x.append(x[0])
        if x[0] > x[1]:
            y.append(y[0] - (x[0] - x[1]))
            y.append(y[0] - (x[0] - x[1]))
        else:
            y.append(y[0] + (x[1] - x[0]))
            y.append(y[0] + (x[1] - x[0]))
    print("{} {} {} {}".format(x[2], y[2], x[3], y[3]))



if __name__ == '__main__':
    B()

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2=map(int,input().split())
if x1-x2>0 and y1==y2:
    p=x1-x2
    print(x2,y2-p,x1,y1-p)
elif x1==x2 and y1-y2>0:
    p=y1-y2
    print(x2+p,y2,x1+p,y1)
elif x1-x2<0 and y1==y2:
    p=x2-x1
    print(x2,y2+p,x1,y1+p)
elif x1==x2 and y1-y2<0:
    p=y2-y1
    print(x2-p,y2,x1-p,y1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y, xx, yy = input().split()
x = int(x)
y = int(y)
xx = int(xx)
yy = int(yy)

xdiff = (xx-x)
ydiff = (yy-y)

if xdiff < 0 and ydiff < 0:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx+ydiff),str(yy-xdiff),str(x+ydiff),str(y-xdiff))
elif 0 < xdiff and 0 < ydiff:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx-ydiff),str(yy+xdiff),str(x-ydiff),str(y+xdiff))
elif xdiff < 0 and 0 < ydiff:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx-ydiff),str(yy-xdiff),str(x-ydiff),str(y-xdiff))
else:
    xdiff = abs(xx-x)
    ydiff = abs(yy-y)
    print(str(xx+ydiff),str(yy+xdiff),str(x+ydiff),str(y+xdiff))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = abs(a-c)
y = abs(b-d)

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

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2=map(int,input().split())
a=abs(x1-x2)
b=abs(y1-y2)
if(y1<=y2):
  if(x1<=x2):
    print(x2-b,y2+a,x1-b,y1+a)
    #print('a')
  else:
    print(x2-b,y2-a,x1-b,y1-a)
    #print('b')
else:
  if(x1<=x2):
    print(x2+a,y2+b,x1+a,y1+b)
    #print('c')
  else:
    print(x2+b,y2-a,x1+b,y1-a)
    #print('d')

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2=map(int,input().split())
a=abs(x1-x2)
b=abs(y1-y2)
if(y1<=y2):
  if(x1<=x2):
    print(x2-b,y2+a,x1-b,y1+a)
    #print('a')
  else:
    print(x2-b,y2-a,x1-b,y1-a)
    #print('b')
else:
  if(x1<=x2):
    print(x2+a,y2+b,x1+a,y1+b)
    #print('c')
  else:
    print(x2+b,y2+a,x1+b,y1-a)
    #print('d')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2=map(int,input().split())
a=abs(x1-x2)
b=abs(y1-y2)
if(y1<=y2):
  if(x1<=x2):
    print(x2-b,y2+a,x1-b,y1+a)
    print('a')
  else:
    print(x2-b,y2-a,x1-b,y1-a)
    print('b')
else:
  if(x1<=x2):
    print(x2+a,y2+b,x1+a,y1+b)
    print('c')
  else:
    print(x2+b,y2+a,x1+b,y1-a)
    print('d')

Submission status: Wrong Answer

Solution code:
def main():
    x1, y1, x2, y2 = map(int, input().split())
    xx = abs(y1 - y2)
    yy = abs(x1 - x2)
    if x1 > x2:
        print(x2 - xx, y2 - yy, x1 - xx, y1 - yy)
    else:
        print(x2 - xx, y2 + yy, x1 - xx, y1 + yy)


main()

Submission status: Wrong Answer

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

print(x1,y1,x2,y2)
tx = y1-y2
ty = x2-x1

print(x2+tx,y2+ty,x1+tx,y1+ty)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

    if x1 == x2 and y2 > y1:
        length = y2 - y1
        print(x2 - length, y2, x2 - length, y1)

    elif x1 == x2 and y1 > y2:
        length = y1 - y2
        print(x2 + length, y2, x2 + length, y1)

    elif y1 == y2 and x2 > x1:
        length = x2 - x1
        print(x2, y1 + length, x1, y1 + length)

    elif y1 == y2 and x1 > x2:
        length = x1 - x2
        print(x2, y1 - length, x1, y1 - length)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

    length = x1 - x2
    x3 = x2
    y3 = y2 - length
    x4 = x1
    y4 = y3

    print(x3, y3, x4, y4)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

DIF = y2 - y1
x3 = x2 - DIF
y3 = y2
x4 = x3
y4 = y1

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

Submission status: Wrong Answer

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

diff_x = x2 - x1
diff_y = y2 - y1

x3 = x1 - diff_y
y3 = y1 + diff_x

x4 = x2 - diff_y
y4 = y2 + diff_x

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

Submission status: Wrong Answer

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

diff_x = x2 - x1
diff_y = y2 - x2

x3 = x1 - diff_y
y3 = y1 + diff_x

x4 = x2 - diff_y
y4 = y2 + diff_x

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

t = y2-y1
y = x2-x1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int,input().split())
ans = ''
if x1==x2:
    ans += str(x1-(y2-y1))+' '+str(y2)+' '+str(x1-(y2-y1))+' '+str(y1)
elif y1==y2:
    ans += str(x2)+' '+str(y2-(x1-x2))+' '+str(x1)+' '+str(y1-(x1-x2))
elif x1<x2 and y1<y2:
    a = x2-x1
    b = y2-y1
    ans += str(x2-b)+' '+str(y2+a)+' '+str(x1-b)+' '+str(y1+a)
elif x1<x2 and y1>y2:
    a = x2-x1
    b = y1-y2
    ans += str(x2-b)+' '+str(y2+a)+' '+str(x1-a)+' '+str(y1-b)
elif x1>x2 and y1>y2:
    a = x1-x2
    b = y1-y2
    ans += str(x2-b)+' '+str(y2-a)+' '+str(x1-a)+' '+str(y1+b)
else:
    a = x1-x2
    b = y2-y1
    ans += str(x2-b)+' '+str(y2-a)+' '+str(x1-b)+' '+str(y1-a)

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = x1 - x2
b = y1 - y2
x3 = x2 + b
y3 = y2 - a
x4 = x1 + b
y4 = y1 - a
print('{}, {}, {}, {}'.format(x3,y3,x4,y4))

Submission status: Wrong Answer

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

dx = x2 - x1
dy = y2 - y1

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

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = list(map(int, input().split()))
A = x2 - x1
B = y2 - y1
#print(A, B)
x3 = x2 - B
if x1 >= y2:
    y3 = y2 - A
else:
    y3 = y2 + A
x4 = x3 - A

y4 = y3 - B
print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = list(map(int, input().split()))
A = x2 - x1
B = y2 - y1
print(A, B)
x3 = x2 - B
if x1 >= y2:
    y3 = y2 - A
else:
    y3 = y2 + A
x4 = x3 - A

y4 = y3 - B
print(x3, y3, x4, y4)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int, input().split())
a = x2 - x1
b = y2 - y1
  
if x1 == x2:
  if y1 < y2:
    x3 = x2 - b
  else:
    x3 = x2 + b
  x4 = x3
  y3 = y2
  y4 = y1
  
elif y1 == y2:
  if x1 < x2:
    y3 = y2 + a
  else:
    y3 = y2 - a
  y4 = y3
  x3 = x2
  x4 = x1

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

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

Submission status: Wrong Answer

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

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

print(x,y,z,w)

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int,input().split())
h = max(abs(x2-x1),abs(y2-y1))
v = min(abs(x2-x1),abs(y2-y1))
if x1 > x2:
  if y1 > y2: print(x2+h,y2-v,x1+h,y1-v)
  else:print(x2-v,y2-h,x1-v,y1-h)
else:
  if y1 > y2: print(x2+v,y2+h,x1+v,y1+h)
  else:print(x2-h,y2+v,x1-h,y1+v)

Submission status: Wrong Answer

Solution code:
def answer(in0):
    nums = sorted([int(n) for n in in0.split(" ")])
    x1 = int(nums[0])
    y1 = int(nums[1])
    x2 = int(nums[2])
    y2 = int(nums[3])

    width = (x2 - x1)
    height = (y2 - y1)

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

    print(x3, y3, x4, y4)

answer(input())

Submission status: Wrong Answer

Solution code:
import numpy as np
ps = list(map(int, input().split()))
v1 = [ps[2]-ps[0], ps[3]-ps[1]]
res = []
res.append(ps[2]-v1[1])
res.append(ps[3]+v1[0])
res.append(res[0]-v1[0])
res.append(res[1]-v1[1])
print(res)

Submission status: Wrong Answer

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a,b,c,d):
    x = c-a
    y = d-b
    x3 = 0
    x4 = 0
    y3 = 0
    y4 = 0
    #print(x,y)
    x3 = c-y
    y3 = d+x
    x4 = x3-x
    y4 = y3-y
    return x3,y3,x4,y4

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b, str_c, str_d] = line.split(' ')
    return (int(str_a), int(str_b), int(str_c), int(str_d))

def main():
    a, b, c, d = readQuestion()
    answer = solve(a, b, c, d)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a,b,c,d):
    x = c-a
    y = d-b
    x3 = 0
    x4 = 0
    y3 = 0
    y4 = 0
    #print(x,y)
    x3 = c-y
    y3 = d+x
    x4 = x3-x
    y4 = y3-y
    return x3,x4,y3,y4

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b, str_c, str_d] = line.split(' ')
    return (int(str_a), int(str_b), int(str_c), int(str_d))

def main():
    a, b, c, d = readQuestion()
    answer = solve(a, b, c, d)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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





if(y2>y1):
    subX=x1-x2
    subY = y2 - y1
else:
    subX = x2 - x1
    subY= y1-y2
if(x2<x1):
    subX*=-1
if(y2>y1):
    subX*=-1
print('{} {} {} {}'.format( (-1)*(subY)+x2 , (-1)*(subX)+y2 , (-1)*(subY)+x1 ,(-1)*(subX)+y1 ) )

Submission status: Wrong Answer

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





if(y2>y1):
    subX=x1-x2
    subY = y2 - y1
else:
    subX = x2 - x1
    subY= y1-y2
print('{} {} {} {}'.format( (-1)*(subY)+x2 , (-1)*(subX)+y2 , (-1)*(subY)+x1 ,(-1)*(subX)+y1 ) )

Submission status: Wrong Answer

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





if(y2>y1 and x2>x1):
    subX=x1-x2
    subY = y2 - y1
elif y2>y1:
    subX = x2 - x1
    subY = y2 - y1
elif x2>x1:
    subX = x1 - x2
    subY = y1 - y2
else:
    subX = x2 - x1
    subY= y1-y2
print('{} {} {} {}'.format( (-1)*(subY)+x2 , (-1)*(subX)+y2 , (-1)*(subY)+x1 ,(-1)*(subX)+y1 ) )

Submission status: Wrong Answer

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





if(y2>y1 and x2>x1):
    subX=x1-x2
    subY = y2 - y1
elif y2>y1:
    subX = x1 - x2
    subY = y2 - y1
elif x2>x1:
    subX = x2 - x1
    subY = y1 - y2
else:
    subX = x1 - x2
    subY= y1-y2
print('{} {} {} {}'.format( (-1)*(subY)+x2 , (-1)*(subX)+y2 , (-1)*(subY)+x1 ,(-1)*(subX)+y1 ) )

Submission status: Wrong Answer

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





if(y2>y1 and x2>x1):
    subX=x1-x2
    subY = y2 - y1
elif y2>y1:
    subX = x1 - x2
    subY = y2 - y1
elif x2>x1:
    subX = x1 - x2
    subY = y1 - y2
else:
    subX = x1 - x2
    subY= y1-y2
print('{} {} {} {}'.format( (-1)*(subY)+x2 , (-1)*(subX)+y2 , (-1)*(subY)+x1 ,(-1)*(subX)+y1 ) )

Submission status: Wrong Answer

Solution code:
a,b,c,d=map(int,input().split())
x=abs(c-a)
y=abs(d-b)
if y<d:
    x_3,y_3=c-y,d+x
    x_4,y_4=x_3-x,y_3-y
else:
    x_3,y_3=c-y,d-x
    x_4,y_4=x_3-x,y_3-y
print(x_3,y_3,x_4,y_4)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = x2 - x1
y = y2 - y1

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

print(x3, y3, x4, y4)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x1,y1,x2,y2 = map(int,input().rstrip().split())
xx = x2-x1
yy = abs(y2-y1)
print(x2-yy,y2+xx,end=" ")
print(x2-yy-xx,y2+xx-yy)

Submission status: Wrong Answer

Solution code:
# cook your dish here
import numpy as np
if __name__ == '__main__':
    xy = [int(i) for i in input().split()]
    a1 = np.array([xy[0], xy[1]])
    a2 = np.array([xy[2], xy[3]])
    b = a2 - a1
    r = np.pi / 2
    rot = np.matrix((
        (np.cos(r), np.sin(r)),
        (-np.sin(r), np.cos(r))
    ))
    c = np.dot(b, rot)
    a3 = a2+c
    a4 = a1+c
    print('{} {} {} {}'.format(np.round(a3[0,0]), np.round(a3[0,1]), np.round(a4[0,0]), np.round(a4[0,1])))

Submission status: Wrong Answer

Solution code:
x1, y1, x2, y2 = map( int, input().split())
if x1 <= x2:
    X = x2 - x1
    if y1 <= y2:
        Y = y2 - y1
        print("{} {} {} {}".format(x2-Y, y2+X, x1-Y, y1+X))
    else:
        Y = y1 - y2
        print("{} {} {} {}".format(x2+Y, y2+X, x1+Y, y1+X))
else:
    X = x1 - x2
    if y1 <= y2:
        Y = y2 - y1
        print("{} {} {} {}".format(x2-Y, y2 -X, x1-Y, y1-X))        
    else:
        Y = y1 - y2
        print("{} {} {} {}".format(x2+Y, y2-X, x1+Y, y2-X))

Submission status: Wrong Answer

Solution code:
import numpy as np

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

P_1 = np.array([x_1, y_1])
P_2 = np.array([x_2, y_2])
vec_12 = P_2 - P_1
vec_13 = np.array([-vec_12[1], vec_12[0]])
P_3 = P_1 + vec_13
P_4 = P_2 + vec_13
print(P_3[0], P_3[1], P_4[0], P_4[1])

Submission status: Wrong Answer

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

if y_2 < y_1:
  a = y_1 - y_2
  print(x_1 + a, y_2, x_1 + a, y_1)
elif x_1 < x_2:
  a = x_2 - x_1
  print(x_2, y_2 + a, x_1, y_1 + a)
elif y_1 < y_2:
  a = y_2 - y_1
  print(x_2 - a, y_2, x_1 - a, y_1)
else:
  a = x_1 - x_2
  print(x_2, y_2 - a, x_1, y_1 - a)

Submission status: Wrong Answer

Solution code:
def rotleft(dx,dy):
  return -dy, dx

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

dx = x2 - x1
dy = y2 - y1

dx,dy = rotleft(dx,dy)

x3 = x2 + dx
y3 = y2 + dy

dx,dy = rotleft(dx,dy)

x4 = x3 + dx
y4 = y3 + dy

print("%d,%d,%d,%d" % (x3,y3,x4,y4))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
nums = list(map(int, input().split()))
x = abs(nums[0] - nums[2])
y = abs(nums[1] - nums[3])
# kyori = sqrt((x*x) + (y*y))
n1 = nums[2] - y
n2 = nums[3] + x
print(n1, end="")
print(" ", end="")
print(n2, end="")
print(" ", end="")
print(n1 - x, end="")
print(" ", end="")
print(n2 - y, end="")
print(" ", end="")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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


def get_rotation_matrix(rad):
    rot = np.array([[np.cos(rad), -np.sin(rad)],
                    [np.sin(rad), np.cos(rad)]])
    return rot


X1 = x1 - x2
Y1 = y1 - y2
r = get_rotation_matrix(np.pi / 2)
rotated = np.dot(np.asarray([X1, Y1]), r)
print(str(int(round(rotated[0])) + x2) + " " + str(int(round(rotated[1])) + y2), end=" ")

X2 = -int(rotated[0])
Y2 = -int(rotated[1])
r = get_rotation_matrix(np.pi / 2)
XY4 = np.dot(np.asarray([X2, Y2]), r)
x4 = int(XY4[0])
y4 = int(XY4[1])
print(str(x4 + int(round(rotated[0])) + x2) + " " + str(y4 + int(round(rotated[1])) + y2), end="")

Submission status: Wrong Answer

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


def get_rotation_matrix(rad):
    rot = np.array([[np.cos(rad), -np.sin(rad)],
                    [np.sin(rad), np.cos(rad)]])
    return rot

X1 = x1 -x2
Y1 = y1 - y2
r = get_rotation_matrix(-np.pi / 2)
rotated = np.dot(r, np.asarray([X1, Y1]) )
print(str(int(rotated[0])+x2)+" "+ str(int(rotated[1])+y2),end=" ")

X2 = -int(rotated[0])
Y2 = -int(rotated[1])
r = get_rotation_matrix(-np.pi / 2)
XY4 = np.dot(r, np.asarray([X2, Y2]))
x4 = int(XY4[0])
y4 = int(XY4[1])
print(str(x4+int(rotated[0])+x2)+" " +str(y4+int(rotated[1])+y2), end="")

Submission status: Wrong Answer

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


def get_rotation_matrix(rad):
    rot = np.array([[np.cos(rad), -np.sin(rad)],
                    [np.sin(rad), np.cos(rad)]])
    return rot

X1 = x1 -x2
Y1 = y1 - y2
r = get_rotation_matrix(np.pi*3 / 2)
rotated = np.dot(np.asarray([X1, Y1]),r )
print(str(int(rotated[0])+x2)+" "+ str(int(rotated[1])+y2),end=" ")

X2 = -int(rotated[0])
Y2 = -int(rotated[1])
r = get_rotation_matrix(np.pi / 2)
XY4 = np.dot(np.asarray([X2, Y2]),r )
x4 = int(XY4[0])
y4 = int(XY4[1])
print(str(x4+int(rotated[0])+x2)+" " +str(y4+int(rotated[1])+y2), end="")

Submission status: Wrong Answer

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

xdif = abs(x1 - x2)
ydif = abs(y1 - y2)

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

Submission status: Wrong Answer

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


xdif = abs(x1 - x2)
ydif = abs(y1 - y2)

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

Submission status: Wrong Answer

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

tmpx = x2 - x1
tmpy = y2 - y1
if tmpx > 0 and tmpy > 0:
    x3 = x2 - tmpy
    y3 = y2 + tmpx
    x4 = x3 - tmpx
    y4 = y3 - tmpy

elif tmpx == 0 and tmpy > 0:
    x3 = x2 - tmpy
    y3 = y2
    x4 = x3
    y4 = y3 + (x3-x2)
elif tmpx == 0 and tmpy < 0:
    x3 = x2 - tmpy
    y3 = y2
    x4 = x3
    y4 = y3 + (x3-x2)
elif tmpx > 0 and tmpy == 0:
    x3 = x2
    y3 = y2 + tmpx
    x4 = x3 - (y3-y2)
    y4 = y3
elif tmpx < 0 and tmpy == 0:
    x3 = x2
    y3 = y2 + tmpx
    x4 = x3 - (y3-y2)
    y4 = y3

elif tmpx < 0 and tmpy > 0:
    x3 = x2 - tmpy
    y3 = y2 + tmpx
    x4 = x3 - tmpx
    y4 = y3 - tmpy
elif tmpx < 0 and tmpy < 0:
    x3 = x2 + tmpy
    y3 = y2 - tmpx
    x4 = x3 - tmpx
    y4 = y3 - tmpy
elif tmpx > 0 and tmpy < 0:
    x3 = x2 + tmpy
    y3 = y2 - tmpy
    x4 = x3 - tmpx
    y4 = y3 - tmpy

print(x3, y3, x4, y4)

# n, k = map(int, input().split())
# tmp = 0
# tmp = [i for i in range(0, n*2+1, k) if i!=0]
# print(tmp)
# cnt = 0
#
# for k in tmp:
#     if
# for j in tmp:
#     if j %2 == 0:
#         cnt += 1
# print(len(tmp)*3-cnt)

Submission status: Wrong Answer

Solution code:
import math
x1,y1,x2,y2=map(int,input().split())
#dist=sqrt((x2-x1)**2+(y2-y1)**2)
if x1==x2:
    dist=y2-y1
    print('{} {} {} {}'.format(x2-dist,y2,x1-dist,y1))
elif y1==y2:
    dist=x2-x1
    print('{} {} {} {}'.format(x2,y2-dist,x1,y1-dist))
else:
    x3=x2-y2+y1
    y3=x2-x1+y2
    x4=x1+y1-y2
    y4=x2+y1-x1
    #x3=x1+((x2-x1)*(math.sqrt(2)/2)-(y2-y1)*(math.sqrt(2)/2))*math.sqrt(2)
    #y3=y1+((x2-x1)*(math.sqrt(2)/2)-(y2-y1)*(math.sqrt(2)/2))*math.sqrt(2)
    #x4=x2+((x1-x2)*(math.sqrt(2)/2)-(y1-y2)*(math.sqrt(2)/2))*math.sqrt(2)
    #y4=y2+((x1-x2)*(math.sqrt(2)/2)-(y1-y2)*(math.sqrt(2)/2))*math.sqrt(2)
    print('{} {} {} {}'.format(x3,y3,x4,y4))