A[9999],B[9999];z(int*a,int*b){return*b-*a;}
main(n,m,i,j){for(;scanf("%d",&n),m=n+n;puts(i>n?"No":"Yes")){
for(i=0;i<n;i++)scanf("%d",A+i);
for(i=0;i<n;i++)scanf("%d",B+i);
for(i=qsort(A,n,4,z);i<n;A[i++]?i=n+1:1)for(j=0;j<n;j++)if(B[j])A[i]--,B[j]--;
}exit(0);}