#include<cstdio>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<iostream>
#define ll long long
using namespace std;
const int maxn = 110;
const int inf = 0x3f3f3f3f;
int n, m, k, N, t;
int main()
{
scanf("%d", &n);
int flag = 0;
while (n--)
{
scanf("%d", &k);
if (k == 1)
flag = 1;
}
if (flag)printf("YES\n");
else
printf("NO\n");
}