import java.util.*;
public class Div2A143 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int r1 = sc.nextInt();
        int r2 = sc.nextInt();
        sc.nextLine();
        int c1 = sc.nextInt();
        int c2 = sc.nextInt();
        sc.nextLine();
        int d1 = sc.nextInt();
        int d2 = sc.nextInt();      
        int x = (r1 + c1 - d2)/2;
        int y = (d2 - c1 + r1)/2;
        int w = (c1 -r1 + d2)/2;
        int z = (2*r2 - c1 +r1 - d2)/2;
        System.out.println(x + " " + y);
        System.out.println(w + " " + z);
        sc.close();
  
     
     }
}
