output_description: Print `YES` if the arrangement of the poles is beautiful; print `NO`
  otherwise.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      a b c
attempt: ###
  ### atcorder test program
  ###
  
  import sys
  
  
  ### math class
  class math:
      ### pi
      pi = 3.14159265358979323846264338
  
      ### GCD
      def gcd(self, a, b):
          if b == 0:
              return a
          return self.gcd(b, a % b)
  
      ### LCM
      def lcm(self, a, b):
          return (a * b) // self.gcd(a, b)
  
      ### Prime number search
      def Pnum(self, a):
          if a == 1:
              return False
          for i in range(2, int(a**0.5) + 1):
              if a % i == 0:
                  return False
          return True
  
      ### Circle area
      def caria(self, r):
          return r * r * self.pi
  
  
  math = math()
  
  
  ### output class
  class output:
      ### list
      def list(self, l):
          l = list(l)
          print(" ", end="")
          for i, num in enumerate(l):
              print(num, end="")
              if i != len(l) - 1:
                  print(" ", end="")
          print()
  
  
  output = output()
  
  ### input sample
  # i = input()
  # A, B, C = [x for x in input().split()]
  # inlist = [int(w) for w in input().split()]
  # R = float(input())
  # A = [int(x) for x in input().split()]
  # for line in sys.stdin.readlines():
  #    x, y = [int(temp) for temp in line.split()]
  
  ### output sample
  # print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
  # print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
  # print(" {}".format(i), end="")
  
  A, B, C = [int(x) for x in input().split()]
  
  if B - A == C - B:
      print("YES")
  else:
      print("NO")
  
problem_description: Statement
  
  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.
samples: [{"input": "2 4 6", "output": "YES\n    \n\nSince 4-2 = 6-4, this arrangement of poles is beautiful.\n\n* * *"}, {"input": "2 5 6", "output": "NO\n    \n\nSince 5-2 \\neq 6-5, this arrangement of poles is not beautiful.\n\n* * *"}, {"input": "3 2 1", "output": "YES\n    \n\nSince 1-2 = 2-3, this arrangement of poles is beautiful."}]