program main
    implicit none
    integer:: N, d, dif=0, i, j
    integer, allocatable a(:), b(:), c(:)

    read(*,*) N
    allocate(a(N), b(N),c(N))
    read(*,*) a(:)
    read(*,*) b(:)

    d = sum(b)-sum(a)

    do i = 1,N
        if(a(i)/=b(i)) dif=dif+1
    enddo

    if(d<dif)then
        write(*,*) 'No'
        stop
    endif



    write(*,*) 'Yes'

end program