#include <iostream>
#include <cstring>
#include <string>
#include <map>
#include <queue>
#include <set>
#include <cmath>
#include <algorithm>
#include <cstdio>
#include <list>
using namespace std;
#define ll long long
#define inf 0x3f3f3f3f
int i, j, k;
int m, n, p;
int a[10010], b[10010];
int main() {
int t;
int flag = 0;
scanf("%d", &t);
for (i = 0; i < t; i++) {
scanf("%d", &a[i]);
}
for (i = 0; i < t; i++) {
if (a[i] == 1) {
flag = 1;
break;
}
}
if (flag == 1)
printf("YES\n");
else
printf("NO\n");
return 0;
}