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


public class Wise {
	
	public static void main(String[] args) throws java.lang.Exception {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(in, out);
		out.close();
	}
}

class TaskA {
	
	public void solve(InputReader in, PrintWriter out) {
		int r1 = in.nextInt(), r2 = in.nextInt();
		int c1 = in.nextInt(), c2 = in.nextInt();
		int d1 = in.nextInt(), d2 = in.nextInt();
		int a, b, c, d;
		
		a = (r1 + c1 - d2) / 2;
		b = r1 - a;
		c = c1 - a;
		d = r2 - c;
		
		out.println(a + " " + b);
		out.println(c + " " + d);
	}
}

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());
	}
	
	public long nextLong() {
		return Long.parseLong(next());
	}
}
