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()))

if b - a == c - b:

    print("YES")

else:

    print("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()))
if b - a == c - b:
    print("YES")
else:
    print("NO")

-if (b - a) == (c - b): +if b - a == c - b: