object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val pillars = List.fill(3)(sc.nextInt())
  println(if (pillars.zip(pillars.tail).map { case (l, r) => r - l }.distinct.length == 1) "YES" else "NO")
}
