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