import java.util.Scanner;


public class A {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int r1 = sc.nextInt();
		int r2 = sc.nextInt();
		int c1 = sc.nextInt();
		int c2 = sc.nextInt();
		int d1 = sc.nextInt();
		int d2 = sc.nextInt();
		int m = r1 + d1 - c2;
		int n = c2 + r1 - d1;
		int k = 2*d2 - c2 + d1 - r1;
		int p = d1 + c2 - r1;
		if(m != 0 && p != 0 && k != 0 && n != 0 && m != n && n != p && p != k) {
			if(m % 2 == 0 && p % 2 == 0 && n % 2 == 0 && k % 2 == 0) {
				System.out.println(m/2+" "+n/2);
				System.out.println(k/2+" "+p/2);
			} else {
				System.out.println(-1);
			}			
		} else {
			System.out.println(-1);
		}
	}

}
