function Main(input) {
    const numbers = input.split(' ').map(n => Number(n));
    const a = numbers[0];
    const b = numbers[1];
    const c = numbers[2];

    if(b - a === c - b) {
      console.log('YES');
    } else {
      console.log('NO');
    }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));