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.

-----Constraints-----
 - 1 \leq a,b,c \leq 100
 - a, b and c are integers.

-----Input-----
Input is given from Standard Input in the following format:
a b c

-----Output-----
Print YES if the arrangement of the poles is beautiful; print NO otherwise.

-----Sample Input-----
2 4 6

-----Sample Output-----
YES

Since 4-2 = 6-4, this arrangement of poles is beautiful.

Difficulty: introductory

Starter code:

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

pole1, pole2, pole3 = map(int, input().split())
if pole2 - pole1 == pole3 - pole2:
  print('YES')
else:
  print('NO')

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

# 058_a
a, b, c = map(int, input().split())
if (1 <= a & a <= 100) & (1 <= b & b <= 100) & (1 <= c & c <= 100):
    d_ab = b - a
    d_bc = c - b
    if d_ab == d_bc:
        print('YES')
    else:
        print('NO')

# A - ι⊥l
# https://atcoder.jp/contests/abc058/tasks/abc058_a

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

result = 'NO'

if b - a == c - b:
    result = 'YES'
elif a - b == b - c:
    result = 'YES'

print(result)


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

if b - a == c - b:
    print('YES')
else:
    print('NO')


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

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

if b-a==c-b:
  print('YES')
else:
  print('NO')

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

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

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

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


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


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


a,b,c = map(int,input().split())
print(['NO','YES'][b-a == c-b])

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

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


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

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

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

print('YES' if b-a == c-b else 'NO')

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

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

def main():
    t = list(map(int, input().split()))
    if t[1] - t[0] == t[2] - t[1]:
        print('YES')
    else:
        print('NO')

def __starting_point():
    main()
__starting_point()

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

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

if (b - a) == (c - b):
    print('YES')
else:
    print('NO')

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

def __starting_point():
    if (b - a) == (c - b):
        print('YES')
    else:
        print('NO')

__starting_point()

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

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

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

if b - a == c - b:
    print('YES')
else:
    print('NO')

# 柱の高さa,b,cがb-a=c-bを満たすか

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

if b - a == c - b:
    print('YES')
else:
    print('NO')

def iroha():
    a, b, c = list(map(int, input().split()))
    
    one = b - a
    two = c - b

    if one == two:
        print("YES")
    else:
        print("NO")



def __starting_point():
    iroha()


__starting_point()

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

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

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

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

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

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

if b - a == c - b:
    print('YES')
else:
    print('NO')

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

ans = 'NO'

if b - a == c - b:
    ans = 'YES'
elif a - b == b - c:
    ans = 'YES'

print(ans)


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


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

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

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


# 3本の柱が等間隔に並んでいます。柱の高さは左から順に
# a メートル,b メートル,c メートル です。
# 柱の先端が同一直線上に並んでいる時、つまり
# b − a = c − b を満たしているとき、
# この柱の並び方を美しいと呼びます。
# 柱の並び方が美しいかどうかを判定してください。

# 標準入力から a, b, c を取得する
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()))
if b-a==c-b:
    print("YES")
else:
    print("NO")


#   AtCoder abc058 a
#   ストレッチ課題

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

#   判定
if (b - a) == (c - b):
    print("YES")
else:
    print("NO")


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

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

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

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

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

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

if b - a == c - b:
    print('YES')
else:
    print('NO')


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

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

# 入力
a, b, c = map(int, input().split())

# b-a=c-bならYes、違うならNo
if b - a == c - b:
    print('YES')
else:
    print('NO')

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

d = b-a
e = c-b

if d == e:
    print('YES')
else:
    print('NO')

#!/usr/bin/env python3

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


def __starting_point():
    main()

__starting_point()

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

print("YES" if b-a == c-b else "NO")

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

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

a, b, c = map(int, input().split())
print(("NO", "YES")[b - a == c - b])

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

# 3 本の柱が等間隔に並んでいます。柱の高さは左から順に a メートル, b メートル, c メートル です。
# 柱の先端が同一直線上に並んでいる時、つまり b − a = c − b を満たしているとき、 この柱の並び方を美しいと呼びます。
# 柱の並び方が美しいかどうかを判定してください。

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

if b - a == c - b:
    print('YES')

else:
    print('NO')

# 各数値の取得
a,b,c = map(int,input().split())

# 計算結果に基づいてメッセージを出力
if b - a == c - b:
    print("YES")
else:
    print("NO")

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

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


# 058a

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

if b - a == c - b:
    print('YES')
else:
    print('NO')


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

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

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

# A - ι⊥l
def main():
    a, b, c = map(int, input().split())

    if b-a == c-b:
        print('YES')
    else:
        print('NO')
  
        
def __starting_point():
    main()
__starting_point()

# 入力
a, b, c = map(int,input().split())

# 処理
if b - a == c - b:
    print('YES')
else:
    print('NO')

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

a = input().split()
if int(a[2])-int(a[1]) == int(a[1])-int(a[0]):
    print("YES")
else:
    print("NO")

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

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

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

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

if b - a == c - b:
    print('YES')
else:
    print('NO')

# 入力
a, b, c = map(int, input().split())

# 出力
if b - a == c - b:
    print('YES')
else:
    print('NO')

a,b,c = map(int,input().split())
print(['NO','YES'][b-a==c-b])

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

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

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

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

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

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

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

a=list(map(int,input().split()))
 
if a[0]+a[2]==2*a[1]:
  print('YES')
 
else:
  print('NO')


a,b,c = [int(x) for x in input().split()]
if b - a == c - b:
  print("YES")
else:
  print("NO")

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

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

if b-a==c-b:
    ans="YES"
else:
    ans="NO"

print(ans)

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

if b - a == c - b:
    print('YES')
else:
    print('NO')

#n = int(input())
a, b, c = list(map(int, input().split()))
#l = list(map(int,input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

if b-a == c-b:
    print('YES')
else:
    print('NO')


S_list = list(map(int,input().split()))
 
if  S_list[1] - S_list[0] == S_list[2] - S_list[1]:
    result = "YES"
else:
    result = "NO"
print(result)

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

a, b, c = input().split()

if int(b) - int(a) == int(c) - int(b):
    print("YES")
else:
    print("NO")

#58
a,b,c=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 b-a == c-b else "NO"))


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

if b - a == c - b:
    print('YES')
else:
    print('NO')

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

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

A, B, C = [int(i) for i in input().split()]

if B - A == C - B:
  print('YES')
else:
  print('NO')


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

if b - a == c - b:
    print('YES')
else:
    print('NO')

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

'''
abc058 A - ι⊥l
https://atcoder.jp/contests/abc058/tasks/abc058_a
'''

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

if b - a == c - b:
    ans = 'YES'
else:
    ans = 'NO'

print(ans)


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

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

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

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


# A - ι⊥l

# b-a = c-bを満たしていればYes, そうでなければNoを出力する


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

if b-a == c-b:
    print('YES')
else:
    print('NO')