module Main where

isBeautiful :: (Num a, Eq a) => a -> a -> a -> [Char]
isBeautiful a b c = if (a-b)==(b-c) then "YES" else "NO"

main = do
    [a, b, c] <- words <$> getLine
    print $ isBeautiful a, b, c
