#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long int llINF = 0x3f3f3f3f3f3f3f;
const int MAXN = 100100;
const long long int mod = 1e9 + 7;
const int LMAXN = 20;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, sum, gr[512];
  bool um[512];
  memset(um, 0, sizeof(um));
  cin >> n;
  sum = 0;
  for (int i = 1; i <= n; i++) {
    cin >> gr[i];
    sum += gr[i];
    if (gr[i] == 1) um[i] = 1;
  }
  if (sum < (2 * n - 2)) {
    cout << "NO" << endl;
    return 0;
  }
  vector<pair<int, int> > edj;
  int dim = 0;
  int last = -1;
  int first;
  for (int i = 1; i <= n; i++) {
    if (um[i])
      continue;
    else {
      if (last == -1) {
        first = i;
        last = i;
      } else {
        edj.push_back({last, i});
        gr[last]--;
        gr[i]--;
        last = i;
        dim++;
      }
    }
  }
  int j = 0;
  for (int i = 1; i <= n; i++)
    if (um[i]) {
      if (first != -1) {
        edj.push_back({first, i});
        gr[first]--;
        dim++;
        first = -1;
        continue;
      }
      if (last != -1) {
        gr[last]--;
        edj.push_back({last, i});
        dim++;
        last = -1;
        continue;
      }
      while (um[j] || gr[j] < 1) j++;
      gr[j]--;
      edj.push_back({i, j});
    }
  cout << "YES " << dim << endl;
  cout << edj.size() << endl;
  for (auto x : edj) cout << x.first << ' ' << x.second << endl;
}
