#include <bits/stdc++.h>
using namespace std;
void TC() {
  long long int n;
  cin >> n;
  long long int a[n];
  long long int sum = 0;
  long long int ones = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1) ++ones;
    sum += a[i];
  }
  ones -= 2;
  if (sum < 2 * (n - 1)) {
    cout << "NO";
    return;
  }
  cout << "YES ";
  if (ones < 0) ones = 0;
  cout << (n - 1) - ones << '\n';
  vector<long long int> nl, l;
  for (int i = 0; i < n; i++) {
    if (a[i] > 1)
      nl.push_back(i);
    else
      l.push_back(i);
  }
  vector<pair<int, int>> v;
  for (int i = 0; i < nl.size() - 1; i++) {
    v.push_back({nl[i] + 1, nl[i + 1] + 1});
    --a[nl[i]];
    --a[nl[i + 1]];
  }
  if (l.size() > 0) {
    v.push_back({l.back() + 1, nl[0] + 1});
    a[nl[0]]--;
    l.pop_back();
  }
  if (l.size() > 0) {
    v.push_back({l.back() + 1, nl.back() + 1});
    a[nl.back()]--;
    l.pop_back();
  }
  for (int state = 0; state < nl.size() && l.size() > 0; state++) {
    while (!l.empty() && a[nl[state]]--) {
      v.push_back({nl[state] + 1, l.back() + 1});
      l.pop_back();
    }
  }
  cout << v.size() << '\n';
  for (auto [a, b] : v) cout << a << " " << b << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  int tc = 1;
  for (int tt = 1; tt <= tc; tt++) {
    TC();
  }
}
