#include <bits/stdc++.h>
using namespace std;
vector<long long> vec;
long long arr[100100];
vector<pair<long long, long long> > edges;
vector<long long> vec2;
int main() {
  long long n, j, k, t, i, m;
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  t = 1;
  while (t--) {
    cin >> n;
    long long cnt = 0;
    for (i = 1; i <= n; i++) {
      cin >> arr[i];
      if (arr[i] == 1) cnt++, vec.push_back(i);
    }
    if (cnt <= 2) {
      cout << "YES " << n - 1 << '\n';
      cout << n - 1 << '\n';
      long long pre = 0;
      if (cnt != 0) pre = vec[0];
      for (i = 1; i <= n; i++) {
        if (cnt != 0 && i == vec[0]) continue;
        if (cnt == 2 && i == vec[1]) continue;
        if (pre == 0) {
          pre = i;
          continue;
        }
        cout << pre << ' ' << i << '\n';
        pre = i;
      }
      if (cnt > 1) cout << pre << ' ' << vec[1] << '\n';
      return 0;
    }
    long long pre = vec[0];
    long long dm = 0;
    for (i = 1; i <= n; i++) {
      if (arr[i] <= 1) continue;
      edges.push_back(pair<long long, long long>(pre, i));
      dm++;
      arr[pre]--;
      pre = i;
      arr[pre]--;
      vec2.push_back(pre);
    }
    long long op = vec2.size();
    i = op - 1;
    j = 1;
    long long sz = vec.size();
    if (j < sz) dm++;
    while (j < sz && i >= 0) {
      if (arr[vec2[i]] > 0)
        edges.push_back(pair<long long, long long>(vec2[i], vec[j])),
            arr[vec2[i]]--, j++;
      else
        i--;
    }
    if (j < sz)
      cout << "NO\n";
    else {
      cout << "YES " << dm << '\n';
      cout << n - 1 << '\n';
      for (i = 0; i < edges.size(); i++)
        cout << edges[i].first << ' ' << edges[i].second << '\n';
    }
  }
  return 0;
}
