a[202],b[101],i;main(n){for(;~scanf("%d",a+i);i++);for(n=i/2;--i>n;b[a[i]]+=a[i-n]);for(i=0;b[++i]<=*b;);i=!puts(i>101?"YES":"NO");}