const main = stdin => {
  const input = stdin.trim().split('\n')
  const [a, b, c] = input[0].split(' ').map(x => parseInt(x))
  if (b - a === c - b) {
    console.log('YES')
  } else {
    console.log('NO')
  }
}
// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
