"use strict";
    
const main = arg => {
    const a = arg.split("\n")[0].split(" ")[0];
    const b = arg.split("\n")[0].split(" ")[1];
    const c = arg.split("\n")[0].split(" ")[2];
    
    console.log(b - a == c - b ? "YES" : "NO");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));