r1,r2=[int(x) for x in input().split()]
c1,c2=[int(x) for x in input().split()]
d1,d2=[int(x) for x in input().split()]
a1=(r1+c1-d2)//2
a2=abs(r1-a1)
a3=abs(c1-a1)
a4=abs(r2-a3)
if a1>0 and a1!=a2 and a1!=a3 and a1!=a4 and a2!=a3 and a2!=a4 and a3!=a4:
    print(a1,a2)
    print(a3,a4)
else:
    print('-1')