#include <bits/stdc++.h>
using namespace std;
vector<int> lef;
int d[10005];
int main() {
  int n;
  cin >> n;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> d[i + 1];
    if (d[i + 1] == 1)
      lef.push_back(i + 1);
    else
      sum += d[i + 1] - 2;
  }
  sum += 2;
  if (lef.size() < 2) {
    for (int i = 1; i <= n; i++) {
      if (d[i] > 1) d[i] = 1, lef.push_back(i);
      if (lef.size() == 2) break;
    }
  }
  if (lef.size() > sum) {
    cout << "NO" << endl;
    return 0;
  } else {
    cout << "YES ";
    int pp = n - lef.size();
    pp += 1;
    cout << pp << endl << n - 1 << endl;
    int w = 0;
    int next = -1;
    for (int i = 1; i <= n; i++) {
      if (d[i] == 1) continue;
      if (next == -1) {
        next = i;
        d[i]--;
        for (; w < lef.size() - 1 && d[i] > 0; w++, d[i]--) {
          if (w >= 0) cout << i << " " << lef[w] << endl;
        }
      } else {
        cout << i << " " << next << endl;
        next = i;
        d[i] -= 2;
        for (; w < lef.size() - 1 && d[i] > 0; w++, d[i]--) {
          if (w >= 0) cout << i << " " << lef[w] << endl;
        }
      }
    }
    for (; w < lef.size(); w++) {
      cout << next << " " << lef[w] << endl;
    }
  }
}
