import sys

if __name__ == "__main__":
    rows = raw_input('').split()
    cols = raw_input('').split()
    diags = raw_input('').split()

    row_1, row_2 = int(rows[0]), int(rows[1])
    col_1, col_2 = int(cols[0]), int(cols[1])
    diag_1, diag_2 = int(diags[0]), int(diags[1])

    A = (diag_1 + col_1 - row_2) / 2
    B = row_1 - A
    C = diag_2 - B
    D = diag_1 - A

    print("%d %d" % (A, B))
    print("%d %d" % (C, D))

