#include <bits/stdc++.h>
using namespace std;
bool has(vector<int> number_variation, int target);
bool has(vector<int> number_variation, int target) {
  for (auto itr = number_variation.begin(); itr != number_variation.end();
       itr++) {
    if (*itr == target) {
      return true;
    }
  }
  return false;
}
int main(void) {
  int hat_count;
  vector<int> numbers;
  vector<int> number_variation;
  cin >> hat_count;
  for (int i = 0; i < hat_count; i++) {
    int n;
    cin >> n;
    numbers.push_back(n);
  }
  for (int i = 0; i < hat_count; i++) {
    for (auto itr = numbers.begin(); itr != number_variation.end(); itr++) {
      auto find_itr =
          find(number_variation.begin(), number_variation.end(), numbers[i]);
      if (find_itr == number_variation.end()) {
        number_variation.push_back(numbers[i]);
      }
    }
  }
  auto find_zero = find(number_variation.begin(), number_variation.end(), 0);
  if (number_variation.size() == 2) {
    if (find_zero != number_variation.end()) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else if (number_variation.size() == 3) {
    if (find_zero != number_variation.end()) {
      cout << "No" << endl;
    } else {
      cout << "Yes" << endl;
    }
  } else {
    cout << "No" << endl;
  }
  return 0;
}
