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

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

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

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