import qualified Data.ByteString.Char8 as BS
import Control.Monad
import Data.List
import Data.Array.ST
import Data.Array (elems)
import Data.Maybe (fromJust)
import Debug.Trace

toYesNo :: Bool -> String
toYesNo True = "YES"
toYesNo _ = "NO"


solve :: Int -> Int -> Int -> String
solve a b c = toYesNo ((b - a) == (c - b))


main :: IO ()
main = do
    (a:b:c:_) <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
    putStrLn $ solve a b c

