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

print((("NO", "YES")[b - a == c - b]))
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()))
print((("NO", "YES")[b - a == c - b]))

-print(("YES" if b - a == c - b else "NO")) +print((("NO", "YES")[b - a == c - b]))