Three poles stand evenly spaced along a line. Their heights are a, b and c meters, from left to right. We will call the arrangement of the poles _beautiful_ if the tops of the poles lie on the same line, that is, b-a = c-b.  Determine whether the arrangement of the poles is beautiful.
s=input()
a,b,c=s.split()
a=int(a)
b=int(b)
c=int(c)
if (b-a) == (c-b):
    print("Yes")
else:
    print("No")

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