# -*- coding: utf-8 -*-



def solve():

    c = [list(map(int, input().split())) for _ in range(3)]

    for a0 in range(-100, 101) :

        b = [c[0][i] - a0 for i in range(3)]

        if any(c[1][0] - b[0] != c[1][i] - b[i] for i in range(3)):

            continue

        if any(c[2][0] - b[0] != c[2][i] - b[i] for i in range(3)):

            continue

        return True





if __name__ == '__main__':

    if solve() :

        print("Yes")

    else :

        print("No")

# -*- coding: utf-8 -*-



def solve():

    c = [list(map(int, input().split())) for _ in range(3)]

    for a0 in range(-100, 101) :

        b = [c[0][i] - a0 for i in range(3)]

        if any(c[1][0] - b[0] != c[1][i] - b[i] for i in range(3)):

            continue

        if any(c[2][0] - b[0] != c[2][i] - b[i] for i in range(3)):

            continue

        return True

    return False





if solve() :

    print("Yes")

else :

    print("No")

# -*- coding: utf-8 -*-
def solve():
    c = [list(map(int, input().split())) for _ in range(3)]
    for a0 in range(-100, 101):
        b = [c[0][i] - a0 for i in range(3)]
        if any(c[1][0] - b[0] != c[1][i] - b[i] for i in range(3)):
            continue
        if any(c[2][0] - b[0] != c[2][i] - b[i] for i in range(3)):
            continue
        return True


if __name__ == "__main__":
    if solve():
        print("Yes")
    else:
        print("No")

# -*- coding: utf-8 -*-
def solve():
    c = [list(map(int, input().split())) for _ in range(3)]
    for a0 in range(-100, 101):
        b = [c[0][i] - a0 for i in range(3)]
        if any(c[1][0] - b[0] != c[1][i] - b[i] for i in range(3)):
            continue
        if any(c[2][0] - b[0] != c[2][i] - b[i] for i in range(3)):
            continue
        return True
    return False


if solve():
    print("Yes")
else:
    print("No")

+    return False -if __name__ == "__main__": -    if solve(): -        print("Yes") -    else: -        print("No") +if solve(): +    print("Yes") +else: +    print("No")