function Main(input) {
	var A = parseInt(input.split(" ")[0]);
  var B = parseInt(input.split(" ")[1]);
  var C = parseInt(input.split(" ")[2]);
  if(B - A == C - B){
     console.log("YES");
     }else{
      console.log("NO"); 
     }
}

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