"use strict";
const Main = (input) => {
	let xs = input.trim().split(' ').map(v=>parseInt(v,10));
    let A = xs[1] - xs[0];
    let B = xs[2] - xs[1];
	console.log(A,B);
    if(A == B){
    	console.log('YES');
    }else{
    	console.log('NO')
    }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));