object Main extends App {
	def minus(x: Int, y: Int): Int = {
		return y - x;
	}

	val N = io.StdIn.readLine;

	val a = N.split(" ")(0).toInt;
	val b = N.split(" ")(1).toInt;
	val c = N.split(" ")(2).toInt;

	if(minus(a,b) == minus(b,c)) println("YES")
	else println("NO")
}