r1,r2=[int(item) for item in input().split()]
c1,c2=[int(item) for item in input().split()]
d1,d2=[int(item) for item in input().split()]
x=(c1+r1-d2)//2
if (c1+r1-d2)%2==0 and x>0:
    my=[x,r1-x,c1-x,r2-c1+x]
    my1=set(my)
    my2=list(my1)
    if sorted(my)!=sorted(my2):
        print(-1)
    else:
        print(x,end=' ')
        print(r1-x)
        print(c1-x,end=' ')
        print(r2-c1+x)
else:
    print(-1)