import std.stdio;
import std.string;
import std.range;
import std.conv;

void main()
{
	auto ip = readln.split.to!int;, a = ip[0], b = ip[1], c = ip[2]
	if(b-a=c-b){
		writeln("YES");
	}else{
		writeln("NO");
	}
}