Result: Accepted
Time: 4ms
Memory: 1756kB
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <set>
#include <string>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <deque>
#define clr(a,b) memset(a,b,sizeof(a))
#define ll long long
using namespace std;
const int maxn=2*1e5+10;
int n,a,f;
int main()
{
cin>>n;
while(n--)
{
cin>>a;
if(a==1)f=1;
}
if(f)printf("YES\n");
else printf("NO\n");
}