#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int len, zeroNum = 0;
  cin >> len;
  for (int i = 0; i < len; i++) {
    int cnt;
    cin >> cnt;
    zeroNum += (cnt == 0);
  }
  if (len == 3 || zeroNum == len)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
