# -*- coding: utf-8 -*-
import sys

if __name__ == '__main__':


    x1,x2 = map(int,sys.stdin.readline().split())
    y1,y2 = map(int,sys.stdin.readline().split())
    z1,z2 = map(int,sys.stdin.readline().split())

    a = (x1+y1-z2)
    b = (x1+y2-z1)
    c = (x2+y1-z1)
    d = (x2+y2-z2)
    lit = [2,4,6,8,10,12,14,16,18]
    if a%2 ==1 or b%2 ==1 or c%2 ==1 or d%2 ==1 :
        print -1
    elif len(set([a,b,c,d])) != 4:
        print -1
    elif a not in lit or b not in lit or c not in lit or d not in lit:
        print -1
    else:
        print a/2,b/2
        print c/2,d/2
