import java.util.*;

/**
 * Created by Waleed on 4/27/2015.
 */
public class PashmakandGarden {

    public static void main(String[] args) {
        Scanner cs = new Scanner(System.in);
        int x1 = cs.nextInt();
        int x2 = cs.nextInt();
        int y1 = cs.nextInt();
        int y2 = cs.nextInt();
        HashSet<Integer> set=  new HashSet<Integer>();
        set.add(x1);
        set.add(x2);
        set.add(y1);
        set.add(y2);
        if(set.size() == 2)
        {
            LinkedHashSet<String> hash = new LinkedHashSet<String>();
            hash.add(x1+" "+x2);
            hash.add(y1+" "+y2);
            // new Fields
            hash.add(x1 + " " + y1);
            hash.add(y1 + " " + x1);
            hash.add(x2 + " " + y2);
            hash.add(y2 + " " + x2);
            hash.add(x1 + " " + x1);
            hash.add(x2 + " " + x2);
            hash.add(y1 + " " + y1);
            hash.add(y2 + " " + y2);
            Iterator<String> it = hash.iterator();
            it.next();
            it.next();
            System.out.println(it.next()+" "+it.next());
        }
        else
        {
            System.out.println("-1");
        }

    }
}


import java.util.*;

/**
 * Created by Waleed on 4/27/2015.
 */
public class PashmakandGarden {

    public static void main(String[] args) {
        Scanner cs = new Scanner(System.in);
        int x1 = cs.nextInt();
        int y1 = cs.nextInt();
        int x2 = cs.nextInt();
        int y2 = cs.nextInt();

        if (x1 == x2) {
            int len = y2 - y1;
            System.out.println(y1 + " " + len + " " + y2 + " " + len);
        } else if (y1 == y2) {
            int len = x2 - x1;
            System.out.println(x1 + " " + len + " " + x2 + " " + len);
        } else {
            int len1 = x2 - x1;
            int len2 = y2 - y1;
            if (len2 == len1) {
                System.out.println(y1+" "+x2+" "+y2+" "+x1);
            }
            else
            {
                System.out.println("-1");
            }
        }

//        HashSet<Integer> set=  new HashSet<Integer>();
//        set.add(Math.abs(x1));
//        set.add(Math.abs(x2));
//        set.add(Math.abs(y1));
//        set.add(Math.abs(y2));
//        if(set.size() == 2)
//        {
//            LinkedHashSet<String> hash = new LinkedHashSet<String>();
//            hash.add(x1+" "+x2);
//            hash.add(y1+" "+y2);
//            // new Fields
//            hash.add(x1 + " " + y1);
//            hash.add(y1 + " " + x1);
//            hash.add(x2 + " " + y2);
//            hash.add(y2 + " " + x2);
//            hash.add(x1 + " " + x1);
//            hash.add(x2 + " " + x2);
//            hash.add(y1 + " " + y1);
//            hash.add(y2 + " " + y2);
//            Iterator<String> it = hash.iterator();
//            it.next();
//            it.next();
//            System.out.println(it.next()+" "+it.next());
//        }
//        else
//        {
//            System.out.println("-1");
//        }

    }
}


import java.util.Scanner;

public class Garden {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int x1 = sc.nextInt();
		int y1 = sc.nextInt();
		int x2 = sc.nextInt();
		int y2 = sc.nextInt();
	if (x1==x2)
	System.out.println((x1+Math.abs(y1-y2))+" "+y1+" "+(x1+Math.abs(y1-y2))+" "+y2);
	else if (y1==y2)
		System.out.println(x1+" "+(y1+Math.abs(x1-x2))+" "+x2+" "+(y2+Math.abs(x1-x2)));
	else
	{
float d=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
d=(float)Math.pow(d, 0.5);
float x=(float)Math.pow(2, 0.5);
d/=x;
if(d-(int)d!=0)
	{System.out.println("-1");
	}
	else
{
	System.out.println(x1+" "+y2+" "+x2+" "+y1);
}
	}

	}
}


import java.util.Scanner;

public class Garden {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int x1 = sc.nextInt();
		int y1 = sc.nextInt();
		int x2 = sc.nextInt();
		int y2 = sc.nextInt();
	if (x1==x2)
	System.out.println((x1+Math.abs(y1-y2))+" "+y1+" "+(x1+Math.abs(y1-y2))+" "+y2);
	else if (y1==y2)
		System.out.println(x1+" "+(y1+Math.abs(x1-x2))+" "+x2+" "+(y2+Math.abs(x1-x2)));
	else
	{
double d=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
d=Math.pow(d, 0.5);
double x=Math.pow(2, 0.5);
d/=x;
if(d-(int)d!=0) System.out.println("-1");
else
{
	System.out.println(x1+" "+y2+" "+x2+" "+y1);
}
	}

	}
}


import java.util.Scanner;

public class Garden {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x1 = sc.nextInt();
		int y1 = sc.nextInt();
		int x2 = sc.nextInt();
		int y2 = sc.nextInt();
		if (x1 == x2)
			System.out.println((x1 + Math.abs(y1 - y2)) + " " + y1 + " "
					+ (x1 + Math.abs(y1 - y2)) + " " + y2);
		else if (y1 == y2)
			System.out.println(x1 + " " + (y1 + Math.abs(x1 - x2)) + " " + x2
					+ " " + (y2 + Math.abs(x1 - x2)));
		else {
			if (Math.abs(x1 - x2) == Math.abs(y1 - y2)) {

				System.out.println(x2 + " " + y1 + " " + x1 + " " + y2);
			}

			else {
				System.out.println(-1);
			}
		}

	}
}


import java.util.Scanner;

public class Garden {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int x1 = sc.nextInt();
		int y1 = sc.nextInt();
		int x2 = sc.nextInt();
		int y2 = sc.nextInt();
	if (x1==x2)
	System.out.println((x1+Math.abs(y1-y2))+" "+y1+" "+(x1+Math.abs(y1-y2))+" "+y2);
	else if (y1==y2)
		System.out.println(x1+" "+(y1+Math.abs(x1-x2))+" "+x2+" "+(y2+Math.abs(x1-x2)));
	else
	{
float d=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
d=(float)Math.pow(d, 0.5);
float x=(float)Math.pow(2, 0.5);
d/=x;
if(d-(int)d!=0)
	{System.out.println("-1");
	System.out.println(d);
	System.out.println((int)d);
	}
	else
{
	System.out.println(x1+" "+y2+" "+x2+" "+y1);
}
	}

	}
}


import java.util.*;
import java.io.*;
public class cuadratree{
public static void main(String args[]) throws IOException{
BufferedReader lector = new BufferedReader(new InputStreamReader(System.in));
String tmp[] = lector.readLine().split(" ");
int a = Integer.parseInt(tmp[0]);
int b = Integer.parseInt(tmp[1]);
int c = Integer.parseInt(tmp[2]);
int d = Integer.parseInt(tmp[3]);
if((a==c && b==d) || (a!=c && b!=d && Math.abs(a-c)!=Math.abs(b-d))){
System.out.println("-1");
}else if(a==c){
System.out.println((a+Math.abs(b-d))+" "+b+" "+(a+Math.abs(b-d))+" "+d);
}else if(b==d){
System.out.println(a+" "+(b+Math.abs(a-c))+" "+c+" "+(b+Math.abs(a-c)));
}else{
System.out.println(a+" "+d+" "+c+" "+b);
}
}
}


import java.util.*;
import java.io.*;
public class cuadratree{
public static void main(String args[]) throws IOException{
BufferedReader lector = new BufferedReader(new InputStreamReader(System.in));
String tmp[] = lector.readLine().split(" ");
int a = Integer.parseInt(tmp[0]);
int b = Integer.parseInt(tmp[1]);
int c = Integer.parseInt(tmp[2]);
int d = Integer.parseInt(tmp[3]);
if((a==c && b==d) || (a!=c && b!=d && c!=d)){
System.out.println("-1");
}else if(a==c){
System.out.println((a+Math.abs(b-d))+" "+b+" "+(a+Math.abs(b-d))+" "+d);
}else if(b==d){
System.out.println(a+" "+(b+Math.abs(a-c))+" "+c+" "+(b+Math.abs(a-c)));
}else{
System.out.println(a+" "+d+" "+c+" "+b);
}
}
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner kb = new Scanner(System.in);
        int x1=kb.nextInt();
        int y1=kb.nextInt();
        int x2=kb.nextInt();
        int y2=kb.nextInt();

        if(x1==x2){
            int len=Math.abs(y2-y1);
            System.out.println((x1+len)+" "+y1+" "+(x2+len)+" "+y2);
        }else if(y1==y2){
            int len=Math.abs(x2-x1);
            System.out.println(x1+" "+(y1+len)+" "+x2+" "+(y2+len));
        }else{
            double a=0.7071067811865475;
            double angle = Math.abs(y2-y1)/(Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)));

            if(a==angle){
                System.out.println(x1+" "+y2+" "+x2+" "+y1);
            }else{
                System.out.println(-1);
            }
        }
    }
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x1 = sc.nextInt();
        int y1 = sc.nextInt();
        int x2 = sc.nextInt();
        int y2 = sc.nextInt();
        if(x1==x2) System.out.println(y2-y1+x1+" "+y1+" "+(y2-y1+x1)+" "+y2);
        else if(y1==y2) System.out.println(x1+" "+(x2-x1+y1)+" "+x2+" "+(x2-x1+y1));
        else if(x2-x1==y2-y1) System.out.println(x1+" "+y2+" "+x2+" "+y1);
        else if(x2-x1==y1-y2) System.out.println(x1+" "+y2+" "+x2+" "+y1);
        else System.out.println(-1);

    }
}


import java.util.*;
import java.io.IOException;
public class kvadrat {
    public static void main(String[] args)throws IOException {
Scanner in = new Scanner(System.in);
        int a1 = in.nextInt();
        int a2 = in.nextInt();
        int b1 = in.nextInt();
        int b2 = in.nextInt();
        int r=0;
        if(a1==b1)
        {if(a2>b2)r=a2-b2;
         if(b2>a2)r=b2-a2;
         System.out.println(a1+r+" "+a2+" "+(b1+r)+" "+b2);
        }
        else
        if(a2==b2)
        {if(a1>b1)r=a1-b1;
         if(b1>a1)r=b1-a1;
         System.out.println(a1+" "+(a2+r)+" "+b1+" "+(b2+r));
        }
        else
        if(a1==a2&&b1==b2) System.out.println(a1+" "+b1+" "+b2+" "+a2);
        else System.out.println(-1);
    }
}


import java.util.*;
import java.io.IOException;
public class kvadrat {
    public static void main(String[] args)throws IOException {
Scanner in = new Scanner(System.in);
        int a1 = in.nextInt();
        int a2 = in.nextInt();
        int b1 = in.nextInt();
        int b2 = in.nextInt();
        int r=0;
        if(a1==b1)
        {if(a2>b2)r=a2-b2;
         if(b2>a2)r=b2-a2;
         System.out.println(a1+r+" "+a2+" "+(b1+r)+" "+b2);
        }
        else
        if(a2==b2)
        {if(a1>b1)r=a1-b1;
         if(b1>a1)r=b1-a1;
         System.out.println(a1+" "+(a2+r)+" "+b1+" "+(b2+r));
        }
        else
        if(a1==a2&&b1==b2) System.out.println(a1+" "+b1+" "+b2+" "+a2);
        else
       if(Math.abs(a1-b1)==Math.abs(a2-b2)) System.out.println(b2+" "+a1+" "+a2+" "+b1);
        else System.out.println(-1);
    }
}


import java.util.*;
import java.io.IOException;
public class kvadrat {
    public static void main(String[] args)throws IOException {
Scanner in = new Scanner(System.in);
        int a1 = in.nextInt();
        int a2 = in.nextInt();
        int b1 = in.nextInt();
        int b2 = in.nextInt();
        int r=0;
        if(a1==b1)
        {if(a2>b2)r=a2-b2;
         if(b2>a2)r=b2-a2;
         System.out.println(a1+r+" "+a2+" "+(b1+r)+" "+b2);
        }
        else
        if(a2==b2)
        {if(a1>b1)r=a1-b1;
         if(b1>a1)r=b1-a1;
         System.out.println(a1+" "+(a2+r)+" "+b1+" "+(b2+r));
        }
        else
        if(a1==a2&&b1==b2) System.out.println(a1+" "+b1+" "+b2+" "+a2);
        else
       if(Math.abs(a1-b1)==Math.abs(a2-b2)) System.out.println(a1+" "+b2+" "+b1+" "+a2);
        else System.out.println(-1);
    }
}


import java.io.*;
import java.util.*;

public class Main {
    int x1, y1, x2, y2, x3, y3, x4, y4;
    void run() throws Exception{
        x1 = nextInt();
        y1 = nextInt();
        x2 = nextInt();
        y2 = nextInt();

        if(x1 == x2){
            int D = y2 - y1;
            x3 = x1 + D;
            x4 = x3;
            y3 = y1;
            y4 = y2;
        }
        else if(y1 == y2){
            int D = x1 - x2;
            y3 = y2 + D;
            y4 = y3;
            x3 = x1;
            x4 = x2;
        }
        else if(x1 + x2 == y1 + y2 || x1 +y2 == x2 + y1){
            x3 = x1;
            y3 = y2;
            x4 = x2;
            y4 = y1;
        }
        else {
            out.println(-1);
            System.exit(0);
        }

        out.println(x3 + " " + y3 + " " + x4 + " " + y4);
    }

    public static void main(String args[]) throws Exception {
            new Main().run(); // read from stdin/stdout
//          new Main("prog.in", "prog.out").run(); // or use file i/o
    }

    BufferedReader in;
    PrintStream out;
    StringTokenizer st;

    Main() throws Exception {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = System.out;
    }

    Main(String is, String os) throws Exception {
            in = new BufferedReader(new FileReader(new File(is)));
            out = new PrintStream(new File(os));
    }

    int nextInt() throws Exception {
            return Integer.parseInt(next());
    }

    String next() throws Exception {
            while (st == null || !st.hasMoreTokens()) {
                    st = new StringTokenizer(in.readLine());
            }
            return st.nextToken();
    }

}


import java.io.*;
import java.util.*;

public class Main {
    int x1, y1, x2, y2, x3, y3, x4, y4;
    void run() throws Exception{
        x1 = nextInt();
        y1 = nextInt();
        x2 = nextInt();
        y2 = nextInt();

        if(x1 == x2){
            int D = y2 - y1;
            x3 = x1 + D;
            if(Math.abs(x3) > 1000) x3 -= 2*D;
            x4 = x3;
            y3 = y1;
            y4 = y2;
        }
        else if(y1 == y2){
            int D = x1 - x2;
            y3 = y2 + D;
            if(Math.abs(y3) > 1000) y3 -= 2*D;
            y4 = y3;
            x3 = x1;
            x4 = x2;
        }
        else if(x1 + y1 == x2 + y2 || x1 +y2 == x2 + y1){
            x3 = x1;
            y3 = y2;
            x4 = x2;
            y4 = y1;
        }
        else {
            out.println(-1);
            System.exit(0);
        }

        out.println(x3 + " " + y3 + " " + x4 + " " + y4);
    }

    public static void main(String args[]) throws Exception {
            new Main().run(); // read from stdin/stdout
//          new Main("prog.in", "prog.out").run(); // or use file i/o
    }

    BufferedReader in;
    PrintStream out;
    StringTokenizer st;

    Main() throws Exception {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = System.out;
    }

    Main(String is, String os) throws Exception {
            in = new BufferedReader(new FileReader(new File(is)));
            out = new PrintStream(new File(os));
    }

    int nextInt() throws Exception {
            return Integer.parseInt(next());
    }

    String next() throws Exception {
            while (st == null || !st.hasMoreTokens()) {
                    st = new StringTokenizer(in.readLine());
            }
            return st.nextToken();
    }

}


import java.io.*;
import java.util.*;

public class Main {
    int x1, y1, x2, y2, x3, y3, x4, y4;
    void run() throws Exception{
        x1 = nextInt();
        y1 = nextInt();
        x2 = nextInt();
        y2 = nextInt();

        if(x1 == x2){
            int D = y2 - y1;
            x3 = x1 + D;
            if(Math.abs(x3) > 1000) x3 -= 2*D;
            x4 = x3;
            y3 = y1;
            y4 = y2;
        }
        else if(y1 == y2){
            int D = x1 - x2;
            y3 = y2 + D;
            if(Math.abs(y3) > 1000) y3 -= 2*D;
            y4 = y3;
            x3 = x1;
            x4 = x2;
        }
        else if(x1 + x2 == y1 + y2 || x1 +y2 == x2 + y1){
            x3 = x1;
            y3 = y2;
            x4 = x2;
            y4 = y1;
        }
        else {
            out.println(-1);
            System.exit(0);
        }

        out.println(x3 + " " + y3 + " " + x4 + " " + y4);
    }

    public static void main(String args[]) throws Exception {
            new Main().run(); // read from stdin/stdout
//          new Main("prog.in", "prog.out").run(); // or use file i/o
    }

    BufferedReader in;
    PrintStream out;
    StringTokenizer st;

    Main() throws Exception {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = System.out;
    }

    Main(String is, String os) throws Exception {
            in = new BufferedReader(new FileReader(new File(is)));
            out = new PrintStream(new File(os));
    }

    int nextInt() throws Exception {
            return Integer.parseInt(next());
    }

    String next() throws Exception {
            while (st == null || !st.hasMoreTokens()) {
                    st = new StringTokenizer(in.readLine());
            }
            return st.nextToken();
    }

}


import java.util.Scanner;

public class sq {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int x1=sc.nextInt(),y1=sc.nextInt(),x2=sc.nextInt(),y2=sc.nextInt();
		if(x1==x2)
		{
		System.out.println(x1+(y2-y1)+" "+y1+" "+(int)(x1+(y2-y1))+" "+y2);
		}
		else if(y1==y2)
		{
			System.out.println(x1+" "+(int)(y1+(x2-x1))+" "+x2+" "+(int)(y1+(x2-x1)));
		}
		else if((x2-x1)==(y2-y1))
		{
			System.out.println(x1+" "+y2+" "+x2+" "+y1);
		}
		else
		{
			System.out.println(-1);
		}
		}
}


import java.util.Scanner;

public class sq {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int x1=sc.nextInt(),y1=sc.nextInt(),x2=sc.nextInt(),y2=sc.nextInt();
		if(x1==x2)
		{
		System.out.println(x1+(y2-y1)+" "+y1+" "+(int)(x1+(y2-y1))+" "+y2);
		}
		else if(y1==y2)
		{
			System.out.println(x1+" "+(int)(y1+(x2-x1))+" "+x2+" "+(int)(y1+(x2-x1)));
		}
		else if((x2-x1)==(y2-y1) || (x2-x1)==-1*(y2-y1) )
		{
			System.out.println(x1+" "+y2+" "+x2+" "+y1);
		}
		else
		{
			System.out.println(-1);
		}
		}
}


import java.util.*;
public class PashmanAndGarden {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int x1 = sc.nextInt();
        int y1 = sc.nextInt();
        int x2 = sc.nextInt();
        int y2 = sc.nextInt();
        int d = 0;

        if(x1 == x2){
            d = Math.abs(y2 - (y1));
            int x3 = x1 + d;
            int y3 = y1;
            int x4 = x1 + d;
            int y4 = y2;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else if(y1 == y2){
            System.out.println("entro");
            d = Math.abs(x2 - (x1));
            int x3 = d - x1;
            int y3 = y2 + d;
            int x4 = x2;
            int y4 = y1 + d;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else{
            int dX = Math.abs(x2 - (x1));
            int dY = Math.abs(y2 - (y1));
            if(dX == dY){
                int x3 = x1;
                int y3 = y2;
                int x4 = x2;
                int y4 = y1;
                System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
            }else{
                System.out.println(-1);
            }
        }
    }
}


import java.util.*;
public class PashmanAndGarden {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int x1 = sc.nextInt();
        int y1 = sc.nextInt();
        int x2 = sc.nextInt();
        int y2 = sc.nextInt();
        int d = 0;

        if(x1 == x2){
            d = Math.abs(y2 - (y1));
            int x3 = x1 + d;
            int y3 = y1;
            int x4 = x1 + d;
            int y4 = y2;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else if(y1 == y2){
            d = Math.abs(x2 - (x1));
            int x3 = d - x1;
            int y3 = y2 + d;
            int x4 = x2;
            int y4 = y1 + d;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else{
            int dX = Math.abs(x2 - (x1));
            int dY = Math.abs(y2 - (y1));
            if(dX == dY){
                int x3 = x1;
                int y3 = y2;
                int x4 = x2;
                int y4 = y1;
                System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
            }else{
                System.out.println(-1);
            }
        }
    }
}


import java.util.*;
public class PashmanAndGarden {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int x1 = sc.nextInt();
        int y1 = sc.nextInt();
        int x2 = sc.nextInt();
        int y2 = sc.nextInt();
        int d = 0;

        if(x1 == x2){
            d = Math.abs(y2 - (y1));
            int x3 = x1 + d;
            int y3 = y1;
            int x4 = x1 + d;
            int y4 = y2;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else if(y1 == y2){
            d = Math.abs(x2 - (x1));
            int x3 = x1;
            int y3 = y1 + d;
            int x4 = x2;
            int y4 = y2 + d;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else{
            int dX = Math.abs(x2 - (x1));
            int dY = Math.abs(y2 - (y1));
            if(dX == dY){
                int x3 = x1;
                int y3 = y2;
                int x4 = x2;
                int y4 = y1;
                System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
            }else{
                System.out.println(-1);
            }
        }
    }
}


import java.util.*;
public class PashmanAndGarden {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int x1 = sc.nextInt();
        int y1 = sc.nextInt();
        int x2 = sc.nextInt();
        int y2 = sc.nextInt();
        int d = 0;

        if(x1 == x2){
            d = Math.abs(y2 - (y1));
            int x3 = x1 + d;
            int y3 = y1;
            int x4 = x1 + d;
            int y4 = y2;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else if(y1 == y2){
            d = Math.abs(x2 - (x1));
            int x3 = d;
            int y3 = y2 + d;
            int x4 = x1;
            int y4 = y1 + d;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else if(x2 == y2){
            System.out.println("entro");
            d = x2;
            int x3 = d;
            int y3 = x1;
            int x4 = x1;
            int y4 = y2;
            System.out.println(x4 + " " + y4 + " " + x3 + " " + y3);
        }else{
            System.out.println(-1);
        }
    }
}


import java.util.*;
public class PashmanAndGarden {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int x1 = sc.nextInt();
        int y1 = sc.nextInt();
        int x2 = sc.nextInt();
        int y2 = sc.nextInt();
        int d = 0;

        if(x1 == x2){
            d = Math.abs(y2 - (y1));
            int x3 = x1 + d;
            int y3 = y1;
            int x4 = x1 + d;
            int y4 = y2;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else if(y1 == y2){
            d = Math.abs(x2 - (x1));
            int x3 = d;
            int y3 = y2 + d;
            int x4 = x1;
            int y4 = y1 + d;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else{
            int dX = Math.abs(x2 - (x1));
            int dY = Math.abs(y2 - (y1));
            if(dX == dY){
                int x3 = x1;
                int y3 = y2;
                int x4 = x2;
                int y4 = y1;
                System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
            }else{
                System.out.println(-1);
            }
        }
    }
}


import java.util.*;
public class PashmanAndGarden {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int x1 = sc.nextInt();
        int y1 = sc.nextInt();
        int x2 = sc.nextInt();
        int y2 = sc.nextInt();
        int d = 0;

        if(x1 == x2){
            d = Math.abs(y2 - (y1));
            int x3 = x1 + d;
            int y3 = y1;
            int x4 = x1 + d;
            int y4 = y2;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else if(y1 == y2){
            d = Math.abs(x2 - (x1));
            int x3 = d;
            int y3 = y2 + d;
            int x4 = x1;
            int y4 = y1 + d;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else if(x2 == y2){
            d = x2;
            int x3 = d;
            int y3 = x1;
            int x4 = x1;
            int y4 = y2;
            System.out.println(x4 + " " + y4 + " " + x3 + " " + y3);
        }else{
            System.out.println(-1);
        }
    }
}


import java.util.*;
public class PashmanAndGarden {
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int x1 = sc.nextInt();
        int y1 = sc.nextInt();
        int x2 = sc.nextInt();
        int y2 = sc.nextInt();
        int d = 0;

        if(x1 == x2){
            d = Math.abs(y2 - (y1));
            int x3 = x1 + d;
            int y3 = y1;
            int x4 = x1 + d;
            int y4 = y2;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else if(y1 == y2){
            d = Math.abs(x2 - (x1));
            int x3 = d;
            int y3 = y2 + d;
            int x4 = x1;
            int y4 = y1 + d;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        }else{
            int dX = Math.abs(x2 - (x1));
            int dY = Math.abs(y2 - (y1));
            if(dX == dY){
                int x3 = x1;
                int y3 = y2;
                int x4 = dX;
                int y4 = y1;
                System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
            }else{
                System.out.println(-1);
            }
        }
    }
}


import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int x1 = in.nextInt();
        int y1 = in.nextInt();
        int x2 = in.nextInt();
        int y2 = in.nextInt();

        if (x1 == x2) {
            int side = Math.abs(y1 - y2);
            if (x1 - side >= -1000) {
                out.println((x1 - side) + " " + y1 + " " + (x2 - side) + " " + y2);
            } else if (x1 + side <= 1000){
                out.println((x1 + side) + " " + y1 + " " + (x2 + side) + " " + y2);
            } else {
                out.println(-1);
            }
        } else if (y1 == y2){
            int side = Math.abs(x1 - x2);
            if (y1 - side >= -1000) {
                out.println((x1) + " " + (y1-side) + " " + (x2 ) + " " + (y2-side));
            } else if (y1 + side <= 1000){
                out.println((x1) + " " + (y1+side) + " " + (x2 ) + " " + (y2+side));
            } else {
                out.println(-1);
            }
        } else {
            if (Math.abs(x1 - x2) == Math.abs(y1-y2)) {
                out.println(x1 + " " + y2 + " " + x2 + " " + y1);
            } else {
                out.println(-1);
            }
        }
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}


import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int x1 = in.nextInt();
        int y1 = in.nextInt();
        int x2 = in.nextInt();
        int y2 = in.nextInt();

        if (x1 == x2) {
            int side = Math.abs(y1 - y2);
            if (x1 - side >= -1000) {
                out.println((x1 - side) + " " + y1 + " " + (x2 - side) + " " + y2);
            } else if (x1 + side <= 1000){
                out.println((x1 + side) + " " + y1 + " " + (x2 + side) + " " + y2);
            } else {
                out.println(-1);
            }
        } else if (y1 == y2){
            int side = Math.abs(x1 - x2);
            if (y1 - side >= -1000) {
                out.println((x1) + " " + (y1-side) + " " + (x2 ) + " " + (y2-side));
            } else if (y1 + side <= 1000){
                out.println((x1) + " " + (y1+side) + " " + (x2 ) + " " + (y2+side));
            } else {
                out.println(-1);
            }
        } else {
            if (Math.abs(x1 - x2) != Math.abs(y1-y2)) {
                out.println(x1 + " " + y2 + " " + x2 + " " + y1);
            } else {
                out.println(-1);
            }
        }
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}


import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int x1 = in.nextInt();
        int y1 = in.nextInt();
        int x2 = in.nextInt();
        int y2 = in.nextInt();

        if (x1 == x2) {
            int side = Math.abs(y1 - y2);
            if (x1 - side >= -1000) {
                out.println((x1 - side) + " " + y1 + " " + (x2 - side) + " " + y2);
            } else if (x1 + side <= 1000){
                out.println((x1 + side) + " " + y1 + " " + (x2 + side) + " " + y2);
            } else {
                out.println(-1);
            }
        } else if (y1 == y2){
            int side = Math.abs(x1 - x2);
            if (y1 - side >= -1000) {
                out.println((x1) + " " + (y1-side) + " " + (x2 ) + " " + (y2-side));
            } else if (y1 + side <= 1000){
                out.println((x1) + " " + (y1+side) + " " + (x2 ) + " " + (y2+side));
            } else {
                out.println(-1);
            }
        } else {
            out.println(x1 + " " + y2 + " " + x2 + " " + y1);
        }
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}


import java.util.*;
import java.io.*;

public class A {
    public static void main(String[] args) throws IOException {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int x1 = in.nextInt(), y1 = in.nextInt(), x2 = in.nextInt(), y2 = in
                .nextInt();
        int max1 = Math.max(x1, x2), max2 = Math.max(y1, y2), max = Math.max(
                max1, max2);
        int min1 = Math.min(x1, x2), min2 = Math.min(y1, y2), min = Math.min(
                min1, min2);
        if (x1 == min && y1 == min) {
            if (x2 == min && y2 == max) {
                out.print(max + " " + min + " " + max + " " + max);
                return;
            } else if (x2 == max && y2 == min) {
                out.print(min + " " + max + " " + max + " " + max);
                return;
            } else if (x2 == max && y2 == max) {
                out.print(min + " " + max + " " + max + " " + min);
                return;
            }
        } else if (x1 == min && y1 == max) {
            if (x2 == max && y2 == min) {
                out.print(min + " " + min + " " + max + " " + max);
                return;
            } else if (x2 == max && y2 == max) {
                out.print(min + " " + min + " " + max + " " + min);
                return;
            }
        } else if (x1 == max && y1 == min) {
            if (x2 == max && y2 == max) {
                out.print(min + " " + min + " " + min + " " + max);
                return;
            }
        }
        out.print("-1");
        in.close();
        out.close();
    }
}


import java.util.*;
import java.io.*;

public class A {
    public static void main(String[] args) throws IOException {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int x1 = in.nextInt(), y1 = in.nextInt(), x2 = in.nextInt(), y2 = in
                .nextInt();
        int max1 = Math.max(x1, x2), max2 = Math.max(y1, y2), max = Math.max(
                max1, max2);
        int min1 = Math.min(x1, x2), min2 = Math.min(y1, y2), min = Math.min(
                min1, min2);
        String s = "-1";
        if (x1 == min && y1 == min) {
            if (x2 == min && y2 == max) {
                s = max + " " + min + " " + max + " " + max;
            } else if (x2 == max && y2 == min) {
                s = min + " " + max + " " + max + " " + max;
            } else if (x2 == max && y2 == max) {
                s = min + " " + max + " " + max + " " + min;
            }
        } else if (x1 == min && y1 == max) {
            if (x2 == max && y2 == min) {
                s = min + " " + min + " " + max + " " + max;
            } else if (x2 == max && y2 == max) {
                s = min + " " + min + " " + max + " " + min;
            } else if (x2 == min && y2 == min) {
                s = max + " " + min + " " + max + " " + max;
            }
        } else if (x1 == max && y1 == min) {
            if (x2 == max && y2 == max) {
                s = min + " " + min + " " + min + " " + max;
            } else if (x2 == min && y2 == min) {
                s = min + " " + max + " " + max + " " + max;
            } else if (x2 == min && y2 == max) {
                s = min + " " + min + " " + max + " " + max;
            }
        } else if (x1 == max && y1 == max) {
            if (x2 == min && y2 == min) {
                s = min + " " + max + " " + max + " " + min;
            } else if (x2 == min && y2 == max) {
                s = min + " " + min + " " + max + " " + min;
            } else if (x2 == max && y2 == min) {
                s = min + " " + min + " " + min + " " + max;
            }
        }
        out.print(s);
        in.close();
        out.close();
    }
}


import java.util.*;
import java.io.*;

public class A {
    public static void main(String[] args) throws IOException {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int x1 = in.nextInt(), y1 = in.nextInt(), x2 = in.nextInt(), y2 = in
                .nextInt();
        int max1 = Math.max(x1, x2), max2 = Math.max(y1, y2), max = Math.max(
                max1, max2);
        int min1 = Math.min(x1, x2), min2 = Math.min(y1, y2), min = Math.min(
                min1, min2);
        String s = "-1";
        if (x1 == min && y1 == min) {
            if (x2 == min && y2 == max) {
                s = max + " " + min + " " + max + " " + max;
            } else if (x2 == max && y2 == min) {
                s = min + " " + max + " " + max + " " + max;
            } else if (x2 == max && y2 == max) {
                s = min + " " + max + " " + max + " " + min;
            }
        } else if (x1 == min && y1 == max) {
            if (x2 == max && y2 == min) {
                s = min + " " + min + " " + max + " " + max;
            } else if (x2 == max && y2 == max) {
                s = min + " " + min + " " + max + " " + min;
            }
        } else if (x1 == max && y1 == min) {
            if (x2 == max && y2 == max) {
                s = min + " " + min + " " + min + " " + max;
            }
        }
        out.print(s);
        in.close();
        out.close();
    }
}


import java.io.*;
import java.util.*;

public class A {
    public static void main(String[] args) {
        PrintWriter pw = new PrintWriter(System.out, true);
        Scanner sc = new Scanner(System.in);
        int x1 = sc.nextInt(), y1 = sc.nextInt(), x2 = sc.nextInt(), y2 = sc
                .nextInt();
        if (Math.abs(x1 - x2) == Math.abs(y1 - y2)) {
            pw.println(x1 + " " + y2 + " " + x2 + " " + y1);
        } else if (x1 == x2) {
            pw.println((x1 + Math.abs(y1 - y2)) + " " + y1 + " "
                    + (x2 + Math.abs(y1 - y2)) + " " + y2);
        } else if (y1 == y2) {
            pw.println(x1 + " " + (y1 + Math.abs(x1 - x2)) + " " + x2 + " "
                    + (y2 + Math.abs(x1 - x2)));
        } else {
            pw.println(-1);
        }

        pw.close();
        sc.close();
    }
}


//harish anumula
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class me{
    public static void main(String[] args)throws java.lang.Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedOutputStream(System.out));
        String[] z = br.readLine().split(" ");
        int x1 = Integer.parseInt(z[0]);
        int y1 = Integer.parseInt(z[1]);
        int x2 = Integer.parseInt(z[2]);
        int y2 = Integer.parseInt(z[3]);
        int x3 = 0, y3 = 0 , x4 = 0 , y4 = 0 ;
        boolean check = (x1 + y2 == x2 + y1 || x1+y1==x2+y2);
        if(y1!=y2 && x1!=x2 && !check){
            pw.println(-1);
            pw.close();
            return;
        }
        if(y1 == y2){
            x3 = x1;x4 = x2;
            y3 = x2-x1 + y1;y4 = y3;
        }
        else if (x1 == x2){
            y3 = y1;y4 = y2;
            x3 = y2-y1 + x1;x4 = y2-y1 + x1;
        }
        else if(check){
            x4 = x1 ; y4 = y2; x3 = x2; y3 = y1;
        }
        String a = x3 + " "+ y3 + " " + x4 + " " + y4;
        pw.println(a);
        pw.close();
    }
}


//harish anumula
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class me{
    public static void main(String[] args)throws java.lang.Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedOutputStream(System.out));
        String[] z = br.readLine().split(" ");
        int x1 = Integer.parseInt(z[0]);
        int y1 = Integer.parseInt(z[1]);
        int x2 = Integer.parseInt(z[2]);
        int y2 = Integer.parseInt(z[3]);
        int x3 = 0, y3 = 0 , x4 = 0 , y4 = 0 ;
        boolean check = (y2-y1==x2-x1);
        if(y1!=y2 && x1!=x2 && !check){
            pw.println(-1);
            pw.close();
            return;
        }
        if(y1 == y2){
            x3 = x1;x4 = x2;
            y3 = -672;y4 = y3;
        }
        else if (x1 == x2){
            y3 = y1;y4 = y2;
            x3 = -672;x4 = -672;
        }
        else if(check){
            x4 = x1 ; y4 = y2; x3 = x2; y3 = y1;
        }
        String a = x3 + " "+ y3 + " " + x4 + " " + y4;
        pw.println(a);
        pw.close();
    }
}


//harish anumula
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class me{
    public static void main(String[] args)throws java.lang.Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedOutputStream(System.out));
        String[] z = br.readLine().split(" ");
        int x1 = Integer.parseInt(z[0]);
        int y1 = Integer.parseInt(z[1]);
        int x2 = Integer.parseInt(z[2]);
        int y2 = Integer.parseInt(z[3]);
        int x3 = 0, y3 = 0 , x4 = 0 , y4 = 0 ;
        boolean check = (y2-y1==x2-x1);
        if(y1!=y2 && x1!=x2 && !check){
            pw.println(-1);
            pw.close();
            return;
        }
        if(y1 == y2){
            x3 = x1;x4 = x2;
            y3 = x2-x1 + y1;y4 = y3;
        }
        else if (x1 == x2){
            y3 = y1;y4 = y2;
            x3 = y2-y1 + x1;x4 = y2-y1 + x1;
        }
        else if(check){
            x4 = x1 ; y4 = y2; x3 = x2; y3 = y1;
        }
        String a = x3 + " "+ y3 + " " + x4 + " " + y4;
        pw.println(a);
        pw.close();
    }
}


import java.util.Scanner;

public class A_Pashmak_and_Garden {
	static Scanner input = new Scanner(System.in);

	public static void main(String[] args) {
		int x1=input.nextInt();
		int y1=input.nextInt();
		int x2=input.nextInt();
		int y2=input.nextInt();

		if(x1==x2){
			int x3=x1+ Math.abs(y2-y1);
			int y3=y1;
			int x4=x2+ Math.abs(y2-y1);
			int y4=y2;
			System.out.println(x3+" "+y3+" "+x4+" "+y4);
		}

		else if(y1==y2){
			int x3=x1;
			int y3=y1+Math.abs(x2-x1);
			int x4=x2;
			int y4=y2+Math.abs(x2-x1);
			System.out.println(x3+" "+y3+" "+x4+" "+y4);
		}

		else if(Math.abs(x1-x2)==Math.abs(y1-y2)){
			int x3=x1;
			int y3=y1+Math.abs(x2-x1);
			int x4=x1+Math.abs(x2-x1);
			int y4=y1;
			System.out.println(x3+" "+y3+" "+x4+" "+y4);
		}

		else{
			System.out.println(-1);
		}
	}
}


import java.util.Scanner;

public class A_Pashmak_and_Garden {
	static Scanner input = new Scanner(System.in);

	public static void main(String[] args) {
		int x1=input.nextInt();
		int y1=input.nextInt();
		int x2=input.nextInt();
		int y2=input.nextInt();

		if(x1==x2){
			int x3=x1+ Math.abs(y2-y1);
			int y3=y1;
			int x4=x2+ Math.abs(y2-y1);
			int y4=y2;
			System.out.println(x3+" "+y3+" "+x4+" "+y4);
		}

		else if(y1==y2){
			int x3=x1;
			int y3=y1+Math.abs(x2-x1);
			int x4=x2;
			int y4=y2+Math.abs(x2-x1);
			System.out.println(x3+" "+y3+" "+x4+" "+y4);
		}

		else if(Math.abs(x1-x2)==Math.abs(y1-y2)){
			int x3=x2;
			int y3=y1;
			int x4=x1;
			int y4=y2;
			System.out.println(x3+" "+y3+" "+x4+" "+y4);
		}

		else{
			System.out.println(-1);
		}
	}
}


import java.util.Scanner;

public class two {
    public static void main (String args []){
        Scanner bucky = new Scanner(System.in);
        int x1 = bucky.nextInt();
        int y1 = bucky.nextInt();
        int x2 = bucky.nextInt();
        int y2 = bucky.nextInt();
        int l ;
        if(x1 == x2){
            l = Math.abs(y2-y1);
            System.out.println(x1 + l);
            System.out.println(y1);
            System.out.println(x2+l);
            System.out.println(y2);
        }else if(y2 == y1) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x2);
            System.out.println(y2+l);
        }else if( Math.abs(x2 - x1) == Math.abs(y2 - y1)) {
            l = Math.abs(x2 - x1);
            System.out.println(x1+1);
            System.out.println(y1);
            System.out.println(x1);
            System.out.println(y1+l);
        }else{
            System.out.println(-1);
        }

    }
}


import java.util.Scanner;

public class two {
    public static void main (String args []){
        Scanner bucky = new Scanner(System.in);
        int x1 = bucky.nextInt();
        int y1 = bucky.nextInt();
        int x2 = bucky.nextInt();
        int y2 = bucky.nextInt();
        int l ;
        if(x1 == x2){
            l = Math.abs(y2-y1);
            System.out.println(x1 + l);
            System.out.println(y1);
            System.out.println(x2+l);
            System.out.println(y2);
        }else if(y2 == y1) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x2);
            System.out.println(y2+l);
        }else if( Math.abs(x2 - x1) == Math.abs(y2 - y1)) {
            l = Math.abs(x2 - x1);
            if (x2>x1){
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x1+l);
            System.out.println(y1);
            }else if (x1>x2){
            System.out.println(x2);
            System.out.println(y2+l);
            System.out.println(x2+l);
            System.out.println(y2);}
        }else{
            System.out.println(-1);
        }

    }

}


import java.util.Scanner;

public class two {
    public static void main (String args []){
        Scanner bucky = new Scanner(System.in);
        int x1 = bucky.nextInt();
        int y1 = bucky.nextInt();
        int x2 = bucky.nextInt();
        int y2 = bucky.nextInt();
        int l ;
        if(x1 == x2){
            l = Math.abs(y2-y1);
            System.out.println(x1 + l);
            System.out.println(y1);
            System.out.println(x2+l);
            System.out.println(y2);
        }else if(y2 == y1) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x2);
            System.out.println(y2+l);
        }else if( Math.abs(x2 - x1) == Math.abs(y2 - y1)) {
            System.out.println(x1);
            System.out.println(y2);
            System.out.println(x2);
            System.out.println(y1);
        }else{
            System.out.println(-1);
        }


import java.util.Scanner;

public class two {
    public static void main (String args []){
        Scanner bucky = new Scanner(System.in);
        int x1 = bucky.nextInt();
        int y1 = bucky.nextInt();
        int x2 = bucky.nextInt();
        int y2 = bucky.nextInt();
        int l ;
        if(x1 == x2){
            l = Math.abs(y2-y1);
            System.out.println(x1 + l);
            System.out.println(y1);
            System.out.println(x2+l);
            System.out.println(y2);
        }else if(y2 == y1) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x2);
            System.out.println(y2+l);
        }else if( Math.abs(x2 - x1) == Math.abs(y2 - y1)) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x1+l);
            System.out.println(y1);
        }else{
            System.out.println(-1);
        }

    }
}


import java.util.Scanner;

public class two {
    public static void main (String args []){
        Scanner bucky = new Scanner(System.in);
        int x1 = bucky.nextInt();
        int y1 = bucky.nextInt();
        int x2 = bucky.nextInt();
        int y2 = bucky.nextInt();
        int l ;
        if(x1 == x2){
            l = Math.abs(y2-y1);
            System.out.println(x1 + l);
            System.out.println(y1);
            System.out.println(x2+l);
            System.out.println(y2);
        }
        if(y2 == y1) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x2);
            System.out.println(y2+l);
        }
        if( Math.abs(x2 - x1) == Math.abs(y2 - y1)) {
            l = Math.abs(x2 - x1);
            System.out.println(x1+l);
            System.out.println(y1);
            System.out.println(x1);
            System.out.println(y1+l);
        }else{
            System.out.println(-1);
        }

    }
}


import java.util.Scanner;

public class two {
    public static void main (String args []){
        Scanner bucky = new Scanner(System.in);
        int x1 = bucky.nextInt();
        int y1 = bucky.nextInt();
        int x2 = bucky.nextInt();
        int y2 = bucky.nextInt();
        int l ;
        if(x1 == x2 && y1 != y2){
            l = Math.abs(y2-y1);
            System.out.println(x1 + l);
            System.out.println(y1);
            System.out.println(x2+l);
            System.out.println(y2);
        }else if(y2 == y1) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x2);
            System.out.println(y2+l);
        }else if( Math.abs(x2 - x1) == Math.abs(y2 - y1)) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x1+l);
            System.out.println(y1);
        }else{
            System.out.println(-1);
        }

    }
}


import java.util.Scanner;

public class flowers {
    public static void main (String args []){
        Scanner bucky = new Scanner(System.in);
        int x = bucky.nextInt();
        int el[] = new int[x];
        int con = 0 ;
        while (con<x){
          el[con]= bucky.nextInt();
        ++con;}
        int stpn ;
        int c = 0 ;
        while(c<x*1000){
        for(int con2 = 0;con2<x-1;++con2){
            if (el[con2]<el[con2+1]){
                stpn = el[con2];
                el[con2]=el[con2+1];
                el[con2+1]=stpn;
            }
      ++c; }
        }
       int f1 = el[0]-el[x-1];
       int max = 1;
       int min =1;
       int j =1;
       int g = 2;
       for (int c1 =0 ; c1<(x+1)/2 ; ++c1){
           if(el[0]==el[j]){
               ++max;
           }
           if(el[x-1]==el[x-g]){
               ++min;
           }
           ++j;
           ++g;
       }
       System.out.println(f1);
       System.out.println(max*min);

        }
    }


import java.util.Scanner;

public class two {
    public static void main (String args []){
        Scanner bucky = new Scanner(System.in);
        int x1 = bucky.nextInt();
        int y1 = bucky.nextInt();
        int x2 = bucky.nextInt();
        int y2 = bucky.nextInt();
        int l ;
        if(x1 == x2){
            l = Math.abs(y2-y1);
            System.out.println(x1 + l);
            System.out.println(y1);
            System.out.println(x2+l);
            System.out.println(y2);
        }else if(y2 == y1) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x2);
            System.out.println(y2+l);
        }else if( Math.abs(x2 - x1) == Math.abs(y2 - y1)) {
            l = Math.abs(x2 - x1);
            System.out.println(x1+l);
            System.out.println(y1);
            System.out.println(x1);
            System.out.println(y1+l);
        }else{
            System.out.println(-1);
        }

    }
}


import java.util.Scanner;

public class two {
    public static void main (String args []){
        Scanner bucky = new Scanner(System.in);
        int x1 = bucky.nextInt();
        int y1 = bucky.nextInt();
        int x2 = bucky.nextInt();
        int y2 = bucky.nextInt();
        int l ;
        if(x1 == x2){
            l = Math.abs(y2-y1);
            System.out.println(x1 + l);
            System.out.println(y1);
            System.out.println(x2+l);
            System.out.println(y2);
        }else if(y2 == y1) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x2);
            System.out.println(y2+l);
        }else if( Math.abs(x2 - x1) == Math.abs(y2 - y1)) {
            l = Math.abs(x2 - x1);
            if (x1>x2){
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x1+l);
            System.out.println(y1);
            }else if (x2>x1){
            System.out.println(x2);
            System.out.println(y2+l);
            System.out.println(x2-l);
            System.out.println(y2);}
        }else{
            System.out.println(-1);
        }

    }

}


import java.util.Scanner;

public class two {
    public static void main (String args []){
        Scanner bucky = new Scanner(System.in);
        int x1 = bucky.nextInt();
        int y1 = bucky.nextInt();
        int x2 = bucky.nextInt();
        int y2 = bucky.nextInt();
        int l ;
        if(x1 == x2){
            l = Math.abs(y2-y1);
            System.out.println(x1 + l);
            System.out.println(y1);
            System.out.println(x2+l);
            System.out.println(y2);
        }else if(y2 == y1) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x2);
            System.out.println(y2+l);
        }else if( Math.abs(x2 - x1) == Math.abs(y2 - y1)) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y2);
            System.out.println(x2);
            System.out.println(y1);
        }else{
            System.out.println(-1);
        }

    }

}


import java.util.Scanner;

public class two {
    public static void main (String args []){
        Scanner bucky = new Scanner(System.in);
        int x1 = bucky.nextInt();
        int y1 = bucky.nextInt();
        int x2 = bucky.nextInt();
        int y2 = bucky.nextInt();
        int l ;
        if(x1 == x2){
            l = Math.abs(y2-y1);
            System.out.println(x1 + l);
            System.out.println(y1);
            System.out.println(x2+l);
            System.out.println(y2);
        }else if(y2 == y1) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+l);
            System.out.println(x2);
            System.out.println(y2+l);
        }else if( Math.abs(x2 - x1) == Math.abs(y2 - y1)) {
            l = Math.abs(x2 - x1);
            System.out.println(x1);
            System.out.println(y1+1);
            System.out.println(x1+1);
            System.out.println(y1);
        }else{
            System.out.println(-1);
        }

    }
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.StringTokenizer;

public class A {

	public static String[] readStrings(BufferedReader br) throws Exception {

		StringTokenizer st = new StringTokenizer(br.readLine());

		int i = 0;
		String[] a = new String[st.countTokens()];

		while (st.hasMoreTokens()) {
			a[i++] = st.nextToken();
		}

		return a;

	}

	public static long[] readLongs(BufferedReader br) throws Exception {

		StringTokenizer st = new StringTokenizer(br.readLine());

		int i = 0;
		long[] a = new long[st.countTokens()];

		while (st.hasMoreTokens()) {
			a[i++] = Long.parseLong(st.nextToken());
		}

		return a;

	}

	public static int[] readInts(BufferedReader br) throws Exception {

		StringTokenizer st = new StringTokenizer(br.readLine());

		int i = 0;
		int[] a = new int[st.countTokens()];

		while (st.hasMoreTokens()) {
			a[i++] = Integer.parseInt(st.nextToken());
		}

		return a;

	}

	public static void main(String[] args) throws Exception {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		OutputStream out = new BufferedOutputStream(System.out);

		int[] in = readInts(br);
		int x1 = in[0];
		int y1 = in[1];
		int x2 = in[2];
		int y2 = in[3];

		int dx = Math.abs(x1 - x2);
		int dy = Math.abs(y1 - y2);

		int x3 = 0;
		int y3 = 0;
		int x4 = 0;
		int y4 = 0;

		if (dx > 1 || dy > 1) {
			out.write(("-1" + "\n").getBytes());
		} else {

			if (x1 == x2) {

				x3 = x1 + dy;
				y3 = y1 > y2 ? y1 : y2;

				x4 = x3;
				y4 = y1 > y2 ? y2 : y1;

			} else if (y1 == y2) {

				x3 = x2 > x1 ? x1 : x2;
				y3 = y1 + dx;

				x4 = x2 > x1 ? x2 : x1;
				y4 = y3;

			} else if (dx == 1 && dy == 1) {

				x3 = x1;
				y3 = y2;

				x4 = x2;
				y4 = y1;

			}

			out.write((x3 + " " + y3 + " " + x4 + " " + y4 + "\n").getBytes());

		}

		out.flush();

	}
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.StringTokenizer;

public class A {

	public static String[] readStrings(BufferedReader br) throws Exception {

		StringTokenizer st = new StringTokenizer(br.readLine());

		int i = 0;
		String[] a = new String[st.countTokens()];

		while (st.hasMoreTokens()) {
			a[i++] = st.nextToken();
		}

		return a;

	}

	public static long[] readLongs(BufferedReader br) throws Exception {

		StringTokenizer st = new StringTokenizer(br.readLine());

		int i = 0;
		long[] a = new long[st.countTokens()];

		while (st.hasMoreTokens()) {
			a[i++] = Long.parseLong(st.nextToken());
		}

		return a;

	}

	public static int[] readInts(BufferedReader br) throws Exception {

		StringTokenizer st = new StringTokenizer(br.readLine());

		int i = 0;
		int[] a = new int[st.countTokens()];

		while (st.hasMoreTokens()) {
			a[i++] = Integer.parseInt(st.nextToken());
		}

		return a;

	}

	public static void main(String[] args) throws Exception {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		OutputStream out = new BufferedOutputStream(System.out);

		int[] in = readInts(br);
		int x1 = in[0];
		int y1 = in[1];
		int x2 = in[2];
		int y2 = in[3];

		int dx = Math.abs(x1 - x2);
		int dy = Math.abs(y1 - y2);

		int x3 = 0;
		int y3 = 0;
		int x4 = 0;
		int y4 = 0;

		if (dx == 0 && dy == 0 || dx > 0 && dy > 0 && dx != dy) {
			out.write(("-1" + "\n").getBytes());
		} else {

			if (x1 == x2) {

				x3 = x1 + dy;
				y3 = y1 > y2 ? y1 : y2;

				x4 = x3;
				y4 = y1 > y2 ? y2 : y1;

			} else if (y1 == y2) {

				x3 = x2 > x1 ? x1 : x2;
				y3 = y1 + dx;

				x4 = x2 > x1 ? x2 : x1;
				y4 = y3;

			} else if (dx == 1 && dy == 1) {

				x3 = x1;
				y3 = y2;

				x4 = x2;
				y4 = y1;

			}

			out.write((x3 + " " + y3 + " " + x4 + " " + y4 + "\n").getBytes());

		}

		out.flush();

	}
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.StringTokenizer;

public class A {

	public static String[] readStrings(BufferedReader br) throws Exception {

		StringTokenizer st = new StringTokenizer(br.readLine());

		int i = 0;
		String[] a = new String[st.countTokens()];

		while (st.hasMoreTokens()) {
			a[i++] = st.nextToken();
		}

		return a;

	}

	public static long[] readLongs(BufferedReader br) throws Exception {

		StringTokenizer st = new StringTokenizer(br.readLine());

		int i = 0;
		long[] a = new long[st.countTokens()];

		while (st.hasMoreTokens()) {
			a[i++] = Long.parseLong(st.nextToken());
		}

		return a;

	}

	public static int[] readInts(BufferedReader br) throws Exception {

		StringTokenizer st = new StringTokenizer(br.readLine());

		int i = 0;
		int[] a = new int[st.countTokens()];

		while (st.hasMoreTokens()) {
			a[i++] = Integer.parseInt(st.nextToken());
		}

		return a;

	}

	public static void main(String[] args) throws Exception {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		OutputStream out = new BufferedOutputStream(System.out);

		int[] in = readInts(br);
		int x1 = in[0];
		int y1 = in[1];
		int x2 = in[2];
		int y2 = in[3];

		int dx = Math.abs(x1 - x2);
		int dy = Math.abs(y1 - y2);

		int x3 = 0;
		int y3 = 0;
		int x4 = 0;
		int y4 = 0;

		if (dx == 0 && dy == 0 || dx > 0 && dy > 0 && dx != dy) {
			out.write(("-1" + "\n").getBytes());
		} else {

			if (x1 == x2) {

				x3 = x1 + dy;
				y3 = y1 > y2 ? y1 : y2;

				x4 = x3;
				y4 = y1 > y2 ? y2 : y1;

			} else if (y1 == y2) {

				x3 = x2 > x1 ? x1 : x2;
				y3 = y1 + dx;

				x4 = x2 > x1 ? x2 : x1;
				y4 = y3;

			} else if (dx == dy) {

				x3 = x1;
				y3 = y2;

				x4 = x2;
				y4 = y1;

			}

			out.write((x3 + " " + y3 + " " + x4 + " " + y4 + "\n").getBytes());

		}

		out.flush();

	}
}


//package Codeforces.Div2A_261.Code1;

import java.awt.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*
 * some cheeky quote
 */

public class Main
{
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException
    {
        int x1 = in.nextInt();
        int y1 = in.nextInt();
        int x2 = in.nextInt();
        int y2 = in.nextInt();

        Point p1 = new Point(x1, y1);
        Point p2 = new Point(x2, y2);

        if (p1.y == p2.y)
        {
            int x3 = p1.x;
            int x4 = p2.x;
            int y3 = p1.y + Math.round(p1.y - p2.y);
            int y4 = y3;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        } else if (p1.x == p2.x)
        {
            int y3 = p1.y;
            int y4 = p2.y;
            int x3 = p1.x + Math.round(y3 - y4);
            int x4 = x3;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        } else
        {
            int x3 = p2.x;
            int y3 = p1.y;
            int x4 = p1.x;
            int y4 = p2.y;

            double dist1 = Math.pow(x4 - p2.x, 2) + Math.pow(y4 - p2.y, 2);
            double dist2 = Math.pow(p2.x - x3, 2) + Math.pow(p2.y - y3, 2);
            //System.out.println(dist1);
            //System.out.println(dist2);
            if (dist1 == dist2)
            {
                System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
            } else
            {
                System.out.println(-1);
            }

        }
    }

    public void run()
    {
        try
        {
            in = new FastScanner();
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e)
        {
            e.printStackTrace();
        }
    }

    class FastScanner
    {
        BufferedReader br;
        StringTokenizer st;

        FastScanner()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreTokens())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }
    }

    public static void main(String[] arg)
    {
        new Main().run();
    }
}


//package Codeforces.Div2A_261.Code1;

import java.awt.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/*
 * some cheeky quote
 */

public class Main
{
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException
    {
        int x1 = in.nextInt();
        int y1 = in.nextInt();
        int x2 = in.nextInt();
        int y2 = in.nextInt();

        Point p1 = new Point(x1, y1);
        Point p2 = new Point(x2, y2);

        if (p1.y == p2.y)
        {
            int x3 = p1.x;
            int x4 = p2.x;
            int y3 = p1.y + Math.round(p1.x - p2.x);
            int y4 = y3;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        } else if (p1.x == p2.x)
        {
            int y3 = p1.y;
            int y4 = p2.y;
            int x3 = p1.x + Math.round(y3 - y4);
            int x4 = x3;
            System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
        } else
        {
            int x3 = p2.x;
            int y3 = p1.y;
            int x4 = p1.x;
            int y4 = p2.y;

            double dist1 = Math.pow(x4 - p2.x, 2) + Math.pow(y4 - p2.y, 2);
            double dist2 = Math.pow(p2.x - x3, 2) + Math.pow(p2.y - y3, 2);
            //System.out.println(dist1);
            //System.out.println(dist2);
            if (dist1 == dist2)
            {
                System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
            } else
            {
                System.out.println(-1);
            }

        }
    }

    public void run()
    {
        try
        {
            in = new FastScanner();
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e)
        {
            e.printStackTrace();
        }
    }

    class FastScanner
    {
        BufferedReader br;
        StringTokenizer st;

        FastScanner()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreTokens())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }
    }

    public static void main(String[] arg)
    {
        new Main().run();
    }
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.HashSet;
import java.util.Iterator;
import java.util.StringTokenizer;

public class PashmakAndGarden {

    public static void main(String [] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        StringTokenizer st = new StringTokenizer(br.readLine());

        int x1 = Integer.parseInt(st.nextToken());
        int y1 = Integer.parseInt(st.nextToken());
        int x2 = Integer.parseInt(st.nextToken());
        int y2 = Integer.parseInt(st.nextToken());

        HashSet<Integer>n = new HashSet<Integer>();
        n.add(x1);
        n.add(y1);
        n.add(x2);
        n.add(y2);

        if(n.size() > 2)
            bw.write("-1");
        else
        {
            String x1y1 = x1+" "+y1;
            String x2y2 = x2+" "+y2;

            Iterator<Integer>it = n.iterator();
            int n1 = it.next();
            int n2 = it.next();

            String ans = n1+" "+n1;
            if(!ans.equals(x1y1) && !ans.equals(x2y2))
                bw.write(ans+" ");

            ans = n1+" "+n2;
            if(!ans.equals(x1y1) && !ans.equals(x2y2))
                bw.write(ans+" ");

            ans = n2+" "+n2;
            if(!ans.equals(x1y1) && !ans.equals(x2y2))
                bw.write(ans+" ");

            ans = n2+" "+n1;
            if(!ans.equals(x1y1) && !ans.equals(x2y2))
                bw.write(ans+" ");

        }
        bw.flush();
    }
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;

public class PashmakAndGarden {

    public static void main(String [] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        StringTokenizer st = new StringTokenizer(br.readLine());

        int x1 = Integer.parseInt(st.nextToken());
        int y1 = Integer.parseInt(st.nextToken());
        int x2 = Integer.parseInt(st.nextToken());
        int y2 = Integer.parseInt(st.nextToken());

        if (x1 != x2 && y1 != y2 && Math.abs(x1-x2) != Math.abs(y1-y2))
           bw.write("-1");
        else
        {
            if(x1 == x2)
            {
                int d = Math.abs(y1-y2);
                bw.write((x1+d)+" "+y1+" "+(x2+d)+" "+y2);
            }
            else
            {
                if(y1 == y2)
                {
                    int d = Math.abs(x1-x2);
                    bw.write(x1+" "+(y1+d)+" "+x2+" "+(y2+d));
                }
                else
                    bw.write(x1+" "+y2+" "+x2+" "+y1);
            }
        }

        bw.flush();
    }
}


/*******************************************************************
My love has gone away,
quietly after a hundered days.
This is what's she has always said she won't stay
for more than what she can repay.

I can still hear her say there
that I'm not hearing tender play
The day she let me kiss her was a display,
of love to those who she betray.

How can I put someone to the test,
when I thought I got the best.
Untill the taste of bitterness then I regret
but still that I won't detest,
the love I can't forget,
like someone who has left.

How can i leave someone for the rest
when i'm alone facing the best
Untill they take some try to reason i regret
But still that i won't detest
who i can never forget
like someone i once met ..
 ******************************************************************/
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.InputMismatchException;

public class TaskA_459 {
	public static void main(String[] args) {
		input();
		solve();
	}

	static void solve() {
		int x3 = 0;
		int y3 = 0;
		int x4 = 0;
		int y4 = 0;
		if ((x1 != x2 && y1 != y2 && (x1 != y1 || x2 != y2)) || (x1 == x2 && y1 == y2)) {
			System.out.println(-1);
			return;
		}
		if(x1 == y1 && x2==y2 )
		{
			x3 = x1;
			y3 = y2;
			x4 = x2;
			y4 = y1;
		}
		if (x1 == x2 && y1 != y2) {
			x3 = y2;
			y3 = y2;
			x4 = y2;
			y4 = x1;
		}
		if (x1 != x2 && y1 == y2) {
			x3 = x2;
			y3 = x2;
			x4 = x1;
			y4 = x2;
		}
		System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
	}

	/************************************************************************************/
	static int x1;
	static int y1;
	static int x2;
	static int y2;

	static void input() {
		x1 = nextInt();
		y1 = nextInt();
		x2 = nextInt();
		y2 = nextInt();
	}

	/************************************************************************************/
	static InputStream is = System.in;
	static private byte[] buffer = new byte[1024];
	static private int lenbuf = 0, ptrbuf = 0;

	static private int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = is.read(buffer);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return buffer[ptrbuf++];
	}

	static private boolean isSpace(int c) {
		return !(c >= 33 && c <= 126);
	}

	static private int read() {
		int b;
		while ((b = readByte()) != -1 && isSpace(b))
			;
		return b;
	}

	static private double nextDouble() {
		return Double.parseDouble(nextString());
	}

	static private char nextChar() {
		return (char) read();
	}

	static private String nextString() {
		int b = read();
		StringBuilder sb = new StringBuilder();
		while (!(isSpace(b))) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	static private char[] nextString(int n) {
		char[] buf = new char[n];
		int b = read(), p = 0;
		while (p < n && !(isSpace(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	static private int nextInt() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nextLong() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	static private int[] nextAi(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

}


/*******************************************************************
My love has gone away,
quietly after a hundered days.
This is what's she has always said she won't stay
for more than what she can repay.

I can still hear her say there
that I'm not hearing tender play
The day she let me kiss her was a display,
of love to those who she betray.

How can I put someone to the test,
when I thought I got the best.
Untill the taste of bitterness then I regret
but still that I won't detest,
the love I can't forget,
like someone who has left.

How can i leave someone for the rest
when i'm alone facing the best
Untill they take some try to reason i regret
But still that i won't detest
who i can never forget
like someone i once met ..
 ******************************************************************/
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.InputMismatchException;

public class TaskA_459 {
	public static void main(String[] args) {
		input();
		solve();
	}

	static void solve() {
		int x3 = 0;
		int y3 = 0;
		int x4 = 0;
		int y4 = 0;
		if (x1 == y1 && x2 == y2) {
			x3 = x1;
			y3 = y2;
			x4 = x2;
			y4 = y1;
		} else if (x1 == x2) {
			x3 = x2 + (y2 - y1);
			y3 = y2;
			x4 = x3;
			y4 = y1;
		} else if (y1 == y2) {
			x3 = x2;
			y3 = y2 + (x2 - x1);
			x4 = x1;
			y4 = y3;
		} else {
			System.out.println(-1);
			return;
		}

		System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
	}

	/************************************************************************************/
	static int x1;
	static int y1;
	static int x2;
	static int y2;

	static void input() {
		x1 = nextInt();
		y1 = nextInt();
		x2 = nextInt();
		y2 = nextInt();
	}

	/************************************************************************************/
	static InputStream is = System.in;
	static private byte[] buffer = new byte[1024];
	static private int lenbuf = 0, ptrbuf = 0;

	static private int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = is.read(buffer);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return buffer[ptrbuf++];
	}

	static private boolean isSpace(int c) {
		return !(c >= 33 && c <= 126);
	}

	static private int read() {
		int b;
		while ((b = readByte()) != -1 && isSpace(b))
			;
		return b;
	}

	static private double nextDouble() {
		return Double.parseDouble(nextString());
	}

	static private char nextChar() {
		return (char) read();
	}

	static private String nextString() {
		int b = read();
		StringBuilder sb = new StringBuilder();
		while (!(isSpace(b))) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	static private char[] nextString(int n) {
		char[] buf = new char[n];
		int b = read(), p = 0;
		while (p < n && !(isSpace(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	static private int nextInt() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nextLong() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	static private int[] nextAi(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

}


/*******************************************************************
My love has gone away,
quietly after a hundered days.
This is what's she has always said she won't stay
for more than what she can repay.

I can still hear her say there
that I'm not hearing tender play
The day she let me kiss her was a display,
of love to those who she betray.

How can I put someone to the test,
when I thought I got the best.
Untill the taste of bitterness then I regret
but still that I won't detest,
the love I can't forget,
like someone who has left.

How can i leave someone for the rest
when i'm alone facing the best
Untill they take some try to reason i regret
But still that i won't detest
who i can never forget
like someone i once met ..
 ******************************************************************/
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.InputMismatchException;

public class TaskA_459 {
	public static void main(String[] args) {
		input();
		solve();
	}

	static void solve() {
		int x3 = 0;
		int y3 = 0;
		int x4 = 0;
		int y4 = 0;
		if (Math.abs(x2-x1) == Math.abs(y2-y1)) {
			x3 = x1;
			y3 = y2;
			x4 = x2;
			y4 = y1;
		} else if (x1 == x2) {
			x3 = x2 + (y2 - y1);
			y3 = y2;
			x4 = x3;
			y4 = y1;
		} else if (y1 == y2) {
			x3 = x2;
			y3 = y2 + (x2 - x1);
			x4 = x1;
			y4 = y3;
		} else {
			System.out.println(-1);
			return;
		}

		System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
	}

	/************************************************************************************/
	static int x1;
	static int y1;
	static int x2;
	static int y2;

	static void input() {
		x1 = nextInt();
		y1 = nextInt();
		x2 = nextInt();
		y2 = nextInt();
	}

	/************************************************************************************/
	static InputStream is = System.in;
	static private byte[] buffer = new byte[1024];
	static private int lenbuf = 0, ptrbuf = 0;

	static private int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = is.read(buffer);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return buffer[ptrbuf++];
	}

	static private boolean isSpace(int c) {
		return !(c >= 33 && c <= 126);
	}

	static private int read() {
		int b;
		while ((b = readByte()) != -1 && isSpace(b))
			;
		return b;
	}

	static private double nextDouble() {
		return Double.parseDouble(nextString());
	}

	static private char nextChar() {
		return (char) read();
	}

	static private String nextString() {
		int b = read();
		StringBuilder sb = new StringBuilder();
		while (!(isSpace(b))) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	static private char[] nextString(int n) {
		char[] buf = new char[n];
		int b = read(), p = 0;
		while (p < n && !(isSpace(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	static private int nextInt() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nextLong() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	static private int[] nextAi(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

}


import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

/**
 *
 * @author amit jhurawat
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        int n = Integer.parseInt(str);
        String st = sc.nextLine();
        StringTokenizer stok = new StringTokenizer(st);
        int [] arr = new int[n];
        for (int i = 0; i < n; i++) {
          arr[i] = Integer.parseInt(stok.nextToken());
        }
        Arrays.sort(arr);
        int a = arr[n-1]-arr[0];
        System.out.print(a+" ");
        int i=0;int count =0;
        while(i<n && arr[i]==arr[0]){
            count++;
            i++;
        }
        if(count==n){
            System.out.print((count*(count-1))/2);
            System.exit(0);
        }
        int j = n-1;
        int count1 =0;
        while(j>=0 && arr[j]==arr[n-1]){
            count1++;
            j--;
        }
        System.out.print(count*count1);
    }

}


import java.util.Scanner;
import java.util.StringTokenizer;

/**
 *
 * @author amit jhurawat
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        String st = sc.nextLine();
        StringTokenizer stok = new StringTokenizer(st);
        int x1 = Integer.parseInt(stok.nextToken());
        int y1 = Integer.parseInt(stok.nextToken());
        int x2 = Integer.parseInt(stok.nextToken());
        int y2 = Integer.parseInt(stok.nextToken());
        if(x1==x2){
            System.out.print((x1+Math.abs(y1-y2))+" "+y1+" "+(x2+Math.abs(y1-y2))+" "+y2);

        System.exit(0);}
        if(y1==y2){
            System.out.print(x1+" "+(y1+Math.abs(x1-x2))+" "+x2+" "+(y2+Math.abs(y1-y2)));
         System.exit(0);}
        if(Math.abs(x1-x2) == Math.abs(y1-y2)){
            System.out.println(x1+" "+y2+" "+x2+" "+y1);
             System.exit(0);}
        else{
            System.out.println(-1);
         System.exit(0);}

    }

}


import java.util.Scanner;
import java.util.StringTokenizer;

/**
 *
 * @author amit jhurawat
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        String st = sc.nextLine();
        StringTokenizer stok = new StringTokenizer(st);
        int x1 = Integer.parseInt(stok.nextToken());
        int y1 = Integer.parseInt(stok.nextToken());
        int x2 = Integer.parseInt(stok.nextToken());
        int y2 = Integer.parseInt(stok.nextToken());
        if(x1==x2){
            System.out.print((x1+Math.abs(y1-y2))+" "+y1+" "+(x2+Math.abs(y1-y2))+" "+y2);

        System.exit(0);}
        if(y1==y2){
            System.out.print(x1+" "+(y1+Math.abs(x1-x2))+" "+x2+" "+(y2+Math.abs(x1-x2)));
         System.exit(0);}
        if(Math.abs(x1-x2) == Math.abs(y1-y2)){
            System.out.println(x1+" "+y2+" "+x2+" "+y1);
             System.exit(0);}
        else{
            System.out.println(-1);
         System.exit(0);}

    }

}


import java.util.Scanner;
import java.util.StringTokenizer;
public class Main {

    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        String st = sc.nextLine();
        StringTokenizer stok = new StringTokenizer(st);
        int x1 = Integer.parseInt(stok.nextToken());
        int y1 = Integer.parseInt(stok.nextToken());
        int x2 = Integer.parseInt(stok.nextToken());
        int y2 = Integer.parseInt(stok.nextToken());
        if(x1==x2){
            System.out.print((x1+Math.abs(y1-y2))+" "+y1+" "+(x2+Math.abs(y1-y2))+" "+y2);
        }
        if(y1==y2){
            System.out.print(x1+" "+(y1+Math.abs(x1-x2))+" "+x2+" "+(x2+Math.abs(y1-y2)));
        }
        if(Math.abs(x1-x2) == Math.abs(y1-y2)){
            System.out.println(x1+" "+y2+" "+x2+" "+y1);
            }
        else{
            System.out.println(-1);
        }

    }

}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll,ll> P;
typedef vector<P> vp;

const ll mod = 1e9+7;
const ll inf = 1e16;

#define loop(i,m,n) for(ll i=m;i<n;i++)
#define vloop(it,x) for(auto it=x.begin(); it!=x.begin(); it++)
#define all(x) x.begin(),x.end()
#define debug(x) cout << #x <<":"<<x<<endl
#define showll(x) printf("%lld\n",x)
#define test(t) ll t;cin >> t;while(t--)
#define showc(x) printf("%c\n",x)
#define readll(x) long long int x;cin >> x
#define yes printf("YES\n")
#define no printf("NO\n")
#define pb push_back

void fast(){
ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
}

//////////////////////////////// - _ - \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

int main()
{
	fast();
	ll t;
	scanf("%lld",&t);
	ll arr[t];
	ll ans[t];
	ll i;
	for(i=0;i<t;i++)
	{
		ll n,j;
		scanf("%lld",&arr[i]);
		n = arr[i];
		ll tmp = n;
		ll ct = 0;
		ll ctt = 0;
		while(tmp!=0)
		{
			tmp = tmp/2;
			ct++;
		}
		ctt = n;
		//printf(" %lld \n",ctt);
		for(j=1;j<ct;j++)
		{
			ctt = ctt + (n/pow(2,j));
		}
		ans[i] = ctt;

	}

	for(i=0;i<t;i++)
	{
		printf("%lld\n",ans[i]);
	}
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll,ll> P;
typedef vector<P> vp;

const ll mod = 1e9+7;
const ll inf = 1e16;

#define loop(i,m,n) for(ll i=m;i<n;i++)
#define vloop(it,x) for(auto it=x.begin(); it!=x.begin(); it++)
#define all(x) x.begin(),x.end()
#define debug(x) cout << #x <<":"<<x<<endl
#define showll(x) printf("%lld\n",x)
#define test(t) ll t;cin >> t;while(t--)
#define showc(x) printf("%c\n",x)
#define readll(x) long long int x;cin >> x
#define yes printf("YES\n")
#define no printf("NO\n")
#define pb push_back

void fast(){
ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
}

//////////////////////////////// - _ - \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

int main()
{
	fast();
	test(t)
	{
		ll n,i;
		scanf("%lld",&n);
		ll tmp = n;
		ll ct = 0;
		ll ctt = 0;
		while(tmp!=0)
		{
			tmp = tmp/2;
			ct++;
		}
		ctt = n;
		printf(" %lld \n",ctt);
		for(i=1;i<ct;i++)
		{
			ctt = ctt + n/pow(2,i);
		}
		printf("%lld\n",ctt);

	}
}


#include <bits/stdc++.h>
#define L "\n"
#define S " "
#define ll long long
#define pb push_back
#define mp make_pair
#define vi std::vector<int>
#define si std::set<int>
#define vl std::vector<long long>
#define qi std::queue<int>
#define s1(a) scanf("%d", &a)
#define s2(a, b) scanf("%d %d", &a, &b)
#define s3(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define de(a) cout << #a << "  ------>  " << a << "\n"
#define SIZE 100002
#define INF INT_MAX
#define rep(i, n) for (int i = 0; i < n; i++)
#define py cout << "YES" << L
#define ny cout << "NO" << L
#define FASTIO                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL)

using namespace std;
ll a[64];

void solve()
{
    ll res = 0;
    int cnt = 0;
    ll n;
    cin >> n;
    while (n != 0)
    {
        ll base = floor(log2(n));
        res += (a[base + 1] + base + 1);
        n -= pow(2, base);
    }
    cout << res << L;
}
int main()
{
    FASTIO;
#ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
    // freopen("out.txt", "w", stdout);
#endif

    a[0] = 0;
    for (int i = 1; i < 64; i++)
    {
        a[i] = a[i - 1] * 2 + i - 1;
    }
    int t;
    cin >> t;
    while (t--)
        solve();
    return 0;
}


#include <bits/stdc++.h>
#define L "\n"
// #define S " "
#define ll long long
#define pb push_back
#define mp make_pair
#define vi std::vector<int>
#define si std::set<int>
#define vl std::vector<long long>
#define qi std::queue<int>
#define s1(a) scanf("%d", &a)
#define s2(a, b) scanf("%d %d", &a, &b)
#define s3(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define de(a) cout << #a << "  ------>  " << a << "\n"
#define SIZE 100002
#define INF INT_MAX
#define rep(i, n) for (int i = 0; i < n; i++)
#define py cout << "YES" << L
#define ny cout << "NO" << L
#define FASTIO                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL)

using namespace std;
ll a[64];
int LOG2(ll n){
    bitset<64> S(n);
    for(int i = 63; i >= 0 ; i--){
        if(S[i] == 1) return i;
    }
}
void solve()
{
    ll res = 0;
    int cnt = 0;
    ll n;
    cin >> n;
    while (n != 0)
    {
        ll base = LOG2(n);
        res += (a[base + 1] + base + 1);
        ll minus = 1LL << base;
        n -= minus;
    }
    cout << res << L;
}
int main()
{
    FASTIO;
#ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
    // freopen("out.txt", "w", stdout);
#endif

    a[0] = 0;
    for (int i = 1; i < 64; i++)
    {
        a[i] = a[i - 1] * 2 + i - 1;
    }
    int t;
    cin >> t;
    while (t--)
        solve();
    return 0;
}


#include <bits/stdc++.h>
#define L "\n"
// #define S " "
#define ll long long
#define pb push_back
#define mp make_pair
#define vi std::vector<int>
#define si std::set<int>
#define vl std::vector<long long>
#define qi std::queue<int>
#define s1(a) scanf("%d", &a)
#define s2(a, b) scanf("%d %d", &a, &b)
#define s3(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define de(a) cout << #a << "  ------>  " << a << "\n"
#define SIZE 100002
#define INF INT_MAX
#define rep(i, n) for (int i = 0; i < n; i++)
#define py cout << "YES" << L
#define ny cout << "NO" << L
#define FASTIO                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL)

using namespace std;
ll a[64];
int LOG2(ll n){
    bitset<64> S(n);
    for(int i = 63; i >= 0 ; i--){
        if(S[i] == 1) return i;
    }
}
void solve()
{
    ll res = 0;
    int cnt = 0;
    ll n;
    cin >> n;
    while (n != 0)
    {
        ll base = LOG2(n);
        res += (a[base + 1] + base + 1);
        // ll minus = 1LL << base;
        n -= pow(2, base);
    }
    cout << res << L;
}
int main()
{
    FASTIO;
#ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
    // freopen("out.txt", "w", stdout);
#endif

    a[0] = 0;
    for (int i = 1; i < 64; i++)
    {
        a[i] = a[i - 1] * 2 + i - 1;
    }
    int t;
    cin >> t;
    while (t--)
        solve();
    return 0;
}


#include <bits/stdc++.h>
#define L "\n"
#define S " "
#define ll long long
#define pb push_back
#define mp make_pair
#define vi std::vector<int>
#define si std::set<int>
#define vl std::vector<long long>
#define qi std::queue<int>
#define s1(a) scanf("%d", &a)
#define s2(a, b) scanf("%d %d", &a, &b)
#define s3(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define de(a) cout << #a << "  ------>  " << a << "\n"
#define SIZE 100002
#define INF INT_MAX
#define rep(i, n) for (int i = 0; i < n; i++)
#define py cout << "YES" << L
#define ny cout << "NO" << L
#define FASTIO                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL)

using namespace std;

void solve()
{
    ll a[66], res = 0;
    a[0] = 0;
    for(int i = 1; i < 64 ; i++){
        a[i] = a[i - 1] * 2 + i - 1;
    }
    ll n; cin >> n;
    while(n != 0){
        ll base = floor(log2(n));
        res += (a[base + 1] + base + 1);
        n -= pow(2, base);
    }
    cout << res << L;
}
int main()
{
    // FASTIO;
    // #ifndef ONLINE_JUDGE
    //     freopen("in.txt", "r", stdin);
    //     // freopen("out.txt", "w", stdout);
    // #endif
    // int t;
    // cin >> t;
    // while (t--)
    solve();
    return 0;
}


#include <bits/stdc++.h>
#define L "\n"
#define S " "
#define ll long long
#define pb push_back
#define mp make_pair
#define vi std::vector<int>
#define si std::set<int>
#define vl std::vector<long long>
#define qi std::queue<int>
#define s1(a) scanf("%d", &a)
#define s2(a, b) scanf("%d %d", &a, &b)
#define s3(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define de(a) cout << #a << "  ------>  " << a << "\n"
#define SIZE 100002
#define INF INT_MAX
#define rep(i, n) for (int i = 0; i < n; i++)
#define py cout << "YES" << L
#define ny cout << "NO" << L
#define FASTIO                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL)

using namespace std;

void solve()
{
    ll a[66], res = 0;
    a[0] = 0;
    for(int i = 1; i < 64 ; i++){
        a[i] = a[i - 1] * 2 + i - 1;
    }
    ll n; cin >> n;
    while(n != 0){
        ll base = floor(log2(n));
        res += (a[base + 1] + base + 1);
        n -= pow(2, base);
    }
    cout << res << L;
}
int main()
{
    FASTIO;
    // #ifndef ONLINE_JUDGE
    //     freopen("in.txt", "r", stdin);
    //     // freopen("out.txt", "w", stdout);
    // #endif
    int t;
    cin >> t;
    while (t--)
    solve();
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#include<math.h>
#define ll unsigned long long
#define ld long double
#define Summon_Tourist ios::sync_with_stdio(false);cin.tie(0);
ll gcd(ll a , ll b) { return b==0?a: gcd( b, a%b); }
ll lcm(ll a , ll b) { return a/gcd(a,b) * b ; }
ll inf = 1e7 + 7;
ll modexp( ll base ,ll power)
 {
     if( power == 0  ) return 1;
     if( power & 1) return base*modexp( base , power-1 )%inf;
     return modexp(base*base%inf,power/2);
 }
int main()
{
  Summon_Tourist
  //freopen("input.txt" , "r" , stdin );
   vector<ll> a(66);
    a[0] = 1;
    for( ll i = 1 ; i<66 ; i++ )
    {
        a[i] = a[i-1] + ( a[i-1] - (i-2) ) + (i-1) ;
    }
  ll t;
  cin>>t;
  while(t--)
  {
    ll n;
    cin>>n;
    bool ok = true ;
    ll ans = 0;
    if( n==0 )
        cout<<0<<endl;
    else
    {
    while( ok )
    {
        ll p = n;
        ll q = 1;
        ll o = 0;
        ll r = pow(2,q);
        while(p/r)
        {
            q++;
            o++;
            r = pow( 2,q );
        }
        ans += a[o];
        n = n - pow(2,o);
        if( n==0 )
            ok = false;
    }
    cout<<ans<<endl;
    }
  }
  return 0;

}


#include<bits/stdc++.h>
using namespace std;
#include<math.h>
#define ll unsigned long long
#define ld long double
#define Summon_Tourist ios::sync_with_stdio(false);cin.tie(0);
ll gcd(ll a , ll b) { return b==0?a: gcd( b, a%b); }
ll lcm(ll a , ll b) { return a/gcd(a,b) * b ; }
ll inf = 1e7 + 7;
ll modexp( ll base ,ll power)
 {
     if( power == 0  ) return 1;
     if( power & 1) return base*modexp( base , power-1 )%inf;
     return modexp(base*base%inf,power/2);
 }
int main()
{
  Summon_Tourist
  //freopen("input.txt" , "r" , stdin );
   vector<ll> a(63);
    a[0] = 1;
    for( ll i = 1 ; i<63 ; i++ )
    {
        a[i] = a[i-1] + ( a[i-1] - (i-2) ) + (i-1) ;
    }
  ll t;
  cin>>t;
  while(t--)
  {
    ll n;
    cin>>n;
    bool ok = true ;
    ll ans = 0;
    while( ok )
    {
        for( ll i = 62 ; i>=0 ; i-- )
        {
            if( n & (1ll<<i) )
            {
                ans += a[i] ;
                n = n - ( 1ll<<i ) ;
                if( n == 0 ) ok = false ;
                break ;
            }
        }
    }
    cout<<ans<<endl;
  }
  return 0;

}


#include<bits/stdc++.h>
using namespace std;
#include<math.h>
#define ll unsigned long long
#define ld long double
#define Summon_Tourist ios::sync_with_stdio(false);cin.tie(0);
ll gcd(ll a , ll b) { return b==0?a: gcd( b, a%b); }
ll lcm(ll a , ll b) { return a/gcd(a,b) * b ; }
ll inf = 1e7 + 7;
ll modexp( ll base ,ll power)
 {
     if( power == 0  ) return 1;
     if( power & 1) return base*modexp( base , power-1 )%inf;
     return modexp(base*base%inf,power/2);
 }
int main()
{
  Summon_Tourist
  //freopen("input.txt" , "r" , stdin );
   vector<ll> a(66);
    a[0] = 1;
    for( ll i = 1 ; i<66 ; i++ )
    {
        a[i] = a[i-1] + ( a[i-1] - (i-2) ) + (i-1) ;
    }
  ll t;
  cin>>t;
  while(t--)
  {
    ll n;
    cin>>n;
    bool ok = true ;
    ll ans = 0;
    if( n==0 )
        cout<<0<<endl;
    else
    {
    while( ok )
    {
        ll p = n;
        ll q = 0;
        while(p/2)
        {
            p/=2;
            q++;
        }
        ans += a[q];
        n = n - pow(2,q);
        if( n==0 )
            ok = false;
    }
    cout<<ans<<endl;
    }
  }
  return 0;

}


#include<bits/stdc++.h>
using namespace std;
#include<math.h>
#define ll unsigned long long
#define ld long double
#define Summon_Tourist ios::sync_with_stdio(false);cin.tie(0);
ll gcd(ll a , ll b) { return b==0?a: gcd( b, a%b); }
ll lcm(ll a , ll b) { return a/gcd(a,b) * b ; }
ll inf = 1e7 + 7;
ll modexp( ll base ,ll power)
 {
     if( power == 0  ) return 1;
     if( power & 1) return base*modexp( base , power-1 )%inf;
     return modexp(base*base%inf,power/2);
 }
int main()
{
  Summon_Tourist
 // freopen("input.txt" , "r" , stdin );
   vector<ll> a(63);
    a[0] = 1;
    for( ll i = 1 ; i<63 ; i++ )
    {
        a[i] = a[i-1] + ( a[i-1] - (i-2) ) + (i-1) ;
    }
  ll t;
  cin>>t;
  while(t--)
  {
    ll n;
    cin>>n;
    bool ok = true ;
    ll ans = 0;
    while( ok )
    {
        ll p = n;
        ll q = 0;
        while(p/2)
        {
            p/=2;
            q++;
        }
        ans += a[q];
        n = n - pow(2,q);
        if( n==0 )
            ok = false;
    }
    cout<<ans<<endl;
  }
  return 0;

}