import Foundation
let line1 = readLine()!

let abc = line1.componentsSeparatedByString( " " )

let aa:String = abc[0]
let bb:String = abc[1]
let cc:String = abc[2]

let a:Int = Int(aa)!
let b:Int = Int(bb)!
let c:Int = Int(cc)!

if b-a == c-b{
    
    print("YES")
    
}
else {
    print("NO")
    
}
