module Main
  ( main
  )
where

import           Control.Applicative
import           Control.Monad
import           Data.List
import           Data.Array
import           Data.Char

main = do
  [a, b, c] <- map (read :: String -> Int) . words <$> getLine
  putStrLn $ if b - a == c - b
    then "YES"
    else "NO"
