#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
const int maxn = 505;
int n;
int a[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  int total = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    total += a[i];
  }
  if (total < (2 * n - 2)) out("NO");
  vector<int> ones;
  for (int i = 1; i <= n; i++) {
    if (a[i] == 1) {
      ones.push_back(i);
      a[i] = 0;
    }
  }
  int t = ones.size();
  int diam = (n - t - 1) + min(2, t);
  vector<pair<int, int>> edges;
  int last = -1;
  if (!ones.empty()) {
    last = ones.back();
    ones.pop_back();
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] > 1) {
      if (last == -1) {
        last = i;
        continue;
      }
      edges.push_back({i, last});
      a[i]--;
      a[last]--;
      last = i;
    }
  }
  for (int v = n; v >= 1; v--) {
    while (a[v] > 0 && !ones.empty()) {
      int w = ones.back();
      ones.pop_back();
      edges.push_back({v, w});
      a[v]--;
    }
  }
  cout << "YES " << diam << endl;
  int count = edges.size();
  cout << count << endl;
  for (auto p : edges) {
    cout << p.first << " " << p.second << endl;
  }
  return 0;
}
