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

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

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