#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i].first;
    v[i].second = i;
  }
  sort(v.begin(), v.end());
  int z = 0;
  while (z < n && v[z].first == 1) z++;
  if (z == n) {
    cout << "NO";
    return 0;
  }
  vector<pair<int, int> > edges;
  int d = n - z - 1, q = 0;
  for (int i = z; i < n - 1; i++) {
    edges.push_back({v[i].second + 1, v[i + 1].second + 1});
    v[i].first--;
    v[i + 1].first--;
  }
  if (q < z) {
    edges.push_back({v[q].second + 1, v[z].second + 1});
    q++;
    v[z].first--;
    d++;
  }
  if (q < z && v[n - 1].first) {
    edges.push_back({v[q].second + 1, v[n - 1].second + 1});
    q++;
    v[n - 1].first--;
    d++;
  } else if (q < z) {
    cout << "NO";
    return 0;
  }
  int p = z;
  while (q < z) {
    while (p < n && !v[p].first) p++;
    if (p == n) {
      cout << "NO";
      return 0;
    }
    edges.push_back({v[q].second + 1, v[p].second + 1});
    v[p].first--;
    q++;
  }
  cout << "YES " << d << endl << n - 1 << endl;
  for (auto x : edges) cout << x.first << " " << x.second << endl;
}
