a,b,c=list(map(int,input().split()));print(('YNEOS'[b-a!=c-b::2]))
a,b,c=list(map(int,input().split()))

print(('YNEOS'[a+c!=b+b::2]))
a, b, c = list(map(int, input().split()))
print(("YNEOS"[b - a != c - b :: 2]))

a, b, c = list(map(int, input().split()))
print(("YNEOS"[a + c != b + b :: 2]))

-print(("YNEOS"[b - a != c - b :: 2])) +print(("YNEOS"[a + c != b + b :: 2]))