import Foundation

extension String {
    var argi: [Int] { return self.characters.split(" ").map { Int(String($0))! } }
}

let inp=readLine()!.argi

let a=inp[0]
let b=inp[1]
let c=inp[2]

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