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().split()
a,b,c = int(s[0]),int(s[1]),int(s[2])
if b-a==c-b:
 print('yes')
else:
 print('no')
s = input().split()
a,b,c = int(s[0]),int(s[1]),int(s[2])
if b-a==c-b:
 print('YES')
else:
 print('NO')