a,b,c = list(map(int,input().split()))

if b-a==c-b:

  print("YES")

else:

  print("NO")
a,b,c = list(map(int,input().split()))

print(("YES" if b-a == c-b else "NO"))
a, b, c = list(map(int, input().split()))
if b - a == c - b:
    print("YES")
else:
    print("NO")

a, b, c = list(map(int, input().split()))
print(("YES" if b - a == c - b else "NO"))

-if b - a == c - b: -    print("YES") -else: -    print("NO") +print(("YES" if b - a == c - b else "NO"))