program prob1
    implicit none
    integer :: a,b,c
    read(*,*) a,b,c
    if(b - a == c - b) then
        write(*,*) 'YES'
    else
        write(*,*) 'NO'
    end if

    stop
contains
end program prob1