program beautiful
  implicit none

  integer :: a, b, c

  read(*,*) a, b, c

  if ( b-a == c-b) then
     write(*,*) 'YES'
  else if ( b-a /= c-b) then
     write(*,*) 'NO'
  end if

end program beautiful