#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#define INF 0x3f3f3f3f
#define lowbit(x) (x&(-x))
using namespace std;
typedef long long ll;
const int maxn = 1e6 + 10;
int main()
{
int n;
scanf("%d",&n);
int flag = 0;
while(n--)
{
int x;
scanf("%d",&x);
if(x == 1)
flag = 1;
}
if(flag)
puts("YES");
else
puts("NO");
}