import Control.Applicative
import Control.Monad
import Data.List

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