function main(input) {
  input = input.trim();
  const [a,b,c] = input.split(" ").map(Number);
  let A = b-a;
  let B = c-a;
  if(A==B){
    console.log("YES");
  }else{
    console.log("NO");
  }
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
