function Main(input) {
  input = input.trim()
  input = input.split(" ").map(Number);
if(input[1]-input[0]==input[2]-input[1]){
  console.log("YES");
}else{
  console.log("NO");
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));