import Control.Monad
import Data.List

readInt = readLn :: IO Int
readInts = map read . words <$> getLine :: IO [Int]
readNInts = flip replicateM readInts

main :: IO ()
main = do
  [a, b, c] <- readInts
  putStrLn $ if b - a == c - b then "YES" else "NO"