program sample
  implicit none

  integer(8) :: a,b,c

  

  ! 整数を読み込む
  read(*,*) a,b,c

  if (abs(real(b)*2-real(a)-real(c)) < 0.00000001) then 
    write(*,*) 'YES'

  else
    write(*,*)'NO'
  end if

  stop
end program sample
