import java.io.*;
import java.util.*;
public class HelpVasilisaTheWise2 
{

    
    public static void main(String[] args) 
    {
        Scanner in = new Scanner(System.in);
        int r1 = in.nextInt();
        int r2 = in.nextInt();
        int c1 = in.nextInt();
        int c2 = in.nextInt();
        int d1 = in.nextInt();
        int d2 = in.nextInt();
        Set<Integer>  s=new HashSet<>();
       
       int X=d1;
       int Y=0;
        for (int i = 0; i < d1; i++)
        {
            X--;
            Y++;
            int x=d2;
            int y=0;
            
            for (int j = 0; j < d2; j++) 
            {
                x--;
                y++;
                
                if ( X+Y == d1 && X+x == r1   && X+y == c1 && x+y == d2 && x+Y == c2 && Y+y == r2)
                {
                    s.add(X);
                    s.add(x);
                    s.add(y);
                    s.add(Y);
                    if (s.size()==4)
                    {
                        System.out.println(X+" "+x);
                        System.out.println(y+" "+Y);
                        return;
                    }
                   
                }
            }
          
          
            
        } 
        System.out.println(-1);
    }
    
}
