#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e2 + 70;
const int INF = 2.1e9;
const int MOD = 1e9 + 7;
int n, m, k;
int a[maxn], r[maxn];
bool cmp(int x, int y) { return a[x] > a[y]; }
int main() {
  while (cin >> n) {
    int sum = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      sum += a[i];
      r[i] = i;
    }
    sort(r + 1, r + n + 1, cmp);
    if (sum < 2 * n - 2)
      cout << "NO" << endl;
    else {
      vector<pair<int, int> > E;
      int rt = r[n], last = rt, d = 0;
      for (int i = 1; i < n; i++) {
        int u = r[i];
        if (u == rt) continue;
        if (a[last]) {
          d++;
          E.push_back(make_pair(last, u));
          a[last]--;
          a[u]--;
          last = u;
        } else {
          if (a[rt]) {
            E.push_back(make_pair(rt, u));
            a[rt]--;
            a[u]--;
          } else {
            for (int j = 1; j <= n; j++) {
              int v = r[j];
              if (a[v]) {
                E.push_back(make_pair(v, u));
                a[v]--;
                a[u]--;
                break;
              }
            }
          }
        }
      }
      cout << "YES " << d << endl;
      cout << E.size() << endl;
      for (int i = 0; i < E.size(); i++) {
        cout << E[i].first << " " << E[i].second << endl;
      }
    }
  }
  return 0;
}
