import std.stdio, std.conv, std.algorithm, std.range, std.array, std.string, std.uni;

void main() {
  auto inp = readln.split.to!(int[]);
  if (inp[1] * 2 == inp[0] + inp[2]) {
    writeln("YES");
  } else {
    writeln("NO");
  }
}