#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 550;
int d[MAX_N];
vector<pair<int, int> > edges;
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> d[i];
  }
  vector<int> leaves;
  vector<int> nonleaves;
  for (int i = 1; i <= n; ++i) {
    if (d[i] == 1) {
      leaves.push_back(i);
    } else {
      nonleaves.push_back(i);
    }
  }
  for (int i = 0; i < (int)nonleaves.size() - 1; ++i) {
    int v = nonleaves[i], w = nonleaves[i + 1];
    edges.push_back(make_pair(v, w));
    d[v]--;
    d[w]--;
  }
  int l = 0, r = nonleaves.size() - 1;
  int p = 0;
  int diameter = nonleaves.size() - 1;
  while (p < leaves.size()) {
    int side = p % 2;
    if (side) {
      while (l <= r && d[nonleaves[l]] == 0) {
        l++;
      }
      if (l > r) {
        break;
      }
      edges.push_back(make_pair(leaves[p], nonleaves[l]));
      d[nonleaves[l]]--;
    } else {
      while (l <= r && d[nonleaves[r]] == 0) {
        r--;
      }
      if (l > r) {
        break;
      }
      edges.push_back(make_pair(leaves[p], nonleaves[r]));
      d[nonleaves[r]]--;
    }
    if (p < 2) {
      diameter++;
    }
    p++;
  }
  if (p == leaves.size()) {
    cout << "YES " << diameter << endl;
    cout << edges.size() << endl;
    for (auto edge : edges) {
      cout << edge.first << " " << edge.second << "\n";
    }
  } else {
    cout << "NO\n";
  }
  return 0;
}
