function Main (input) {
  input = inpur.split("\n")[0].split(" ").map(Number);
  var a = input[0], b = input[1], c = input[2];
  if (b - a == c - b) {
    console.log("YES");
  }
  else {
    console.log("NO");
  }
}

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