program sample
	implicit none
    integer :: x,y,z
    
    read(*,*) x,y,z
    
    if (y-x == z-y) then
    	write(*,*) 'YES'
    else
    	write(*,*) 'NO'
        
    end if
    stop
end program sample