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

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader bi = new BufferedReader(new InputStreamReader(System.in));
        String s = bi.readLine();
        StringTokenizer t = new StringTokenizer(s);
        int[] rows = new int[2];
        rows[0] = Integer.parseInt(t.nextToken());
        rows[1] = Integer.parseInt(t.nextToken());
        s = bi.readLine();
        t = new StringTokenizer(s);
        int[] cols = new int[2];
        cols[0] = Integer.parseInt(t.nextToken());
        cols[1] = Integer.parseInt(t.nextToken());
        s = bi.readLine();
        t = new StringTokenizer(s);
        int[] diagonals = new int[2];
        diagonals[0] = Integer.parseInt(t.nextToken());
        diagonals[1] = Integer.parseInt(t.nextToken());

        System.out.println((rows[0] - cols[1] + diagonals[0])/2 + " " + (cols[1] - diagonals[0] + rows[0])/2);
        System.out.println((rows[0]-cols[0] - diagonals[1])/ (-2) + " " + (rows[0] - diagonals[0] - cols[1]) / -2);

    }


}
