import Foundation

let str = readLine()!
let abc = str.componentsSeparatedByString(" ").map{Int($0)!}
let a = abc[0]
let b = abc[1]
let c = abc[2]

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

