#include <bits/stdc++.h>
using namespace std;
vector<int> v, vv;
long long a[100009];
int main() {
  int n;
  cin >> n;
  int x;
  int re = 0, sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a[i + 1] = x;
    sum += x;
    if (x > 1) {
      v.push_back(i + 1);
      re++;
    } else {
      vv.push_back(i + 1);
    }
  }
  if (sum < 2 * n - 2) {
    cout << "NO";
    return 0;
  }
  if (vv.size() > 1) {
    re += 2;
  } else if (vv.size() > 0) {
    re++;
  }
  re--;
  cout << "YES"
       << " " << re << endl;
  int m = n - 1;
  cout << m << endl;
  int last;
  if (vv.size() > 0) {
    cout << vv[0] << " " << v[0] << endl;
  }
  int u = 1;
  last = v[0];
  while (u < v.size()) {
    cout << last << " " << v[u] << endl;
    last = v[u];
    u++;
  }
  if (vv.size() > 1) {
    cout << last << " " << vv[1] << endl;
  }
  int t = 2;
  if (vv.size() > 2) {
    for (auto pp : v) {
      a[pp] -= 2;
      while (a[pp] > 0 && t < vv.size()) {
        cout << pp << " " << vv[t] << endl;
        t++;
        a[pp]--;
      }
    }
  }
}
