#include #include #include #include #include #include #define ll long long #define P pair #define lP pait using namespace std; int main() { int n,ma=0,k=0; cin>>n; vector a(n),b(n),c(101); for(int i=0;i>a[i]; } for(int i=0;i>b[i]; if(b[i]==0) k+=a[i]; } for(int i=0;i=ma) cout<<"YES"<