#include #include using namespace std; int main(void){ int n,i,m,bzero,a[100],b[101]={}; cin>>n; for(i=0;i>a[i]; for(i=0;i>m; b[m]+=a[i]; } bzero=b[0]; sort(b,b+100,greater()); if(bzero>=b[0]) cout<<"YES\n"; else cout<<"NO\n"; return 0; }