import Foundation
let line1 = readLine()!
let line2 = readLine()!
let line3 = readLine()!

let a:Int = Int(line1)!
let b:Int = Int(line2)!
let c:Int = Int(line3)!

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