#include <stdio.h> int main () { int n,arr[100000],i,sum=0,k; scanf("%d",&n); for (i=0;1;i++) { scanf ("%d",&arr[i]); if(getchar()=='\n') break; } k=i; for (i=0;i<=k;i++) { sum+=arr[i]; } if(sum==n-1) printf("YES"); else printf("NO"); return 0; }