#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
int main()
{
int n;
scanf("%d",&n);
int tmp=0;
for(int i=1;i<=n;i++)
{
int x;
scanf("%d",&x);
if(x==1)tmp=1;
}
if(tmp)printf("YES\n");
else printf("NO\n");
}