#include <bits/stdc++.h>
using namespace std;
using ll = long long;
// 0 0 0
// 1 0 0
// 2 1 0
// 2 0 -1
// 3 1 0

// 0 0 0
// 1 1 0
// 1 0 -1
// 2 1 0

// 1 0
// 0 0
// 0 1
// 2 1
// 1 2
// 

// x x  0 0 0 0 0
// x x  0 1 1 0 0
// x x -1 0 1 0 0
// x x  0 1 2 0 

// 3 0 0 3 possible?
// 1 0 0 0
// 2 1 0 0
// 2 0 -1 0
// 3 1 0 0
// 3 1 0 1
// 3 0 -1 1
// 3 1 0 2

int main() {
  int n; cin >> n;
  bool yes = false;
  for (int i = 0; i < n; i++) {
    int a; cin >> a;
    if (a == 1 or a == 0) yes = true;
  }
  if (yes) cout << "Yes" << endl;
  else cout << "No" << endl;

}