#include <bits/stdc++.h>
using namespace std;
const int maxn = 1006;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  long long i, j, k, l = 0, n, m;
  cin >> n;
  vector<pair<int, int>> v;
  for (i = 0; i < n; i++) {
    cin >> j;
    v.push_back({j, i + 1});
    l += j;
  }
  int vis[maxn] = {};
  sort(v.begin(), v.end());
  if (l < 2 * n - 2) {
    cout << "NO";
  } else {
    j = 0;
    for (i = 2; i < v.size(); i++) {
      if (v[i].first > 1) j++;
    }
    cout << "YES " << j + 1 << "\n";
    cout << n - 1 << "\n";
    int d = j + 1;
    j = -1;
    int p1;
    for (i = 2; i < v.size(); i++) {
      if (v[i].first == 1)
        continue;
      else {
        if (j == -1) {
          p1 = i;
          j = v[i].second;
        } else {
          cout << j << " " << v[i].second << "\n";
          vis[v[i].second]++;
          vis[j]++;
          j = v[i].second;
        }
      }
    }
    cout << v[0].second << " " << v[p1].second << "\n";
    vis[v[p1].second]++;
    cout << v[1].second << " " << v[v.size() - 1].second << "\n";
    vis[v[v.size() - 1].second]++;
    k = v.size() - 1;
    int p = v[k].first - vis[v[k].second];
    for (i = 2; i < p1; i++) {
      while (p <= 0) {
        k--;
        p = v[k].first - vis[v[k].second];
      }
      cout << v[i].second << " " << v[k].second << "\n";
      p--;
    }
  }
}
