def solve():
    ro = map(int, str(raw_input()).split())
    co = map(int, str(raw_input()).split())
    di = map(int, str(raw_input()).split())
    if (sum(ro)!= sum(co)) or (sum(co) != sum(di)) or (sum(di) != sum(ro)):
        print '-1'
        return
    a = []
    b = []
    c = []
    d = []
    first = co[0] +di[0] -ro[1]
    a += [first/2]
    b += [ro[0] - a[0]]
    c += [co[0] - a[0]]
    d += [di[0] - a[0]]

    if(len(set([a[0], b[0], c[0], d[0]])) == 4) and (map(abs, [a[0], b[0], c[0], d[0]]) == [a[0], b[0], c[0], d[0]]):
        print a[0], b[0]
        print c[0], d[0]
        return

    second = co[1] + di[1] - ro[1]
    b += [second/2]
    a += [ro[0] - b[1]]
    c += [di[1] - b[1]]
    d += [co[1] - b[1]]

    if(len(set([a[1], b[1], c[1], d[1]])) == 4) and (map(abs, [a[0], b[0], c[0], d[0]]) == [a[1], b[1], c[1], d[1]]):
        print a[1], b[1]
        print c[1], d[1]
        return

    third = co[0] + di[1] - ro[0]
    c += [third/2]
    a += [co[0] - c[2]]
    b += [di[1] - c[2]]
    d += [ro[1] - c[2]]

    if(len(set([a[2], b[2], c[2], d[2]])) == 4) and (map(abs, [a[0], b[0], c[0], d[0]]) == [a[2], b[2], c[2], d[2]]):
        print a[2], b[2]
        print c[2], d[2]
        return

    fourth = co[1] + di[0] - ro[0]
    d += [fourth/2]
    a += [di[0] - d[3]]
    b += [co[1] - d[3]]
    c += [ro[1] - d[3]]

    if(len(set([a[3], b[3], c[3], d[3]])) == 4) and (map(abs, [a[0], b[0], c[0], d[0]]) == [a[3], b[3], c[3], d[3]]):
        print a[3], b[3]
        print c[3], d[3]
        return
    print "-1"

solve()
