__author__ = 'NIORLYS'
r = list(map(int, input().split()))
c = list(map(int, input().split()))
d = list(map(int, input().split()))
if (r[1] + c[0] - d[0]) % 2 or (r[0] + c[1] - d[0]) % 2:
    print(-1)
else:
    x3 = (r[1] + c[0] - d[0]) // 2
    x2 = (r[0] + c[1] - d[0]) // 2
    s = {r[0] - x2, x2, x3, r[1] - x3}
    if 0 in s or len(s) != 4:
        print(-1)
    else:
        print(r[0] - x2, x2)
        print(x3, r[1] - x3)
