program main
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: a,b,c
    
    read*, a,b,c

    if (b-a == c-b) then
        print'(a)', 'YES'
    else
        print'(a)', 'NO'
    end if
    
end program main