{-# LANGUAGE ScopedTypeVariables, LambdaCase #-}

import qualified Data.List as List
import qualified Data.Set as Set

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