#include <bits/stdc++.h>
using namespace std;
vector<int> o;
vector<pair<int, int> > v, topri;
int n, a[100005], cnt, sum;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    cnt += (a[i] == 1);
    if (a[i] >= 2)
      v.push_back(make_pair(i, a[i])), sum += (a[i] - 2);
    else
      o.push_back(i);
  }
  sum += 2;
  if (cnt > sum) {
    cout << "NO\n";
    return 0;
  }
  if (cnt == 0) {
    cout << "YES " << v.size() - 1 << endl;
    for (int i = 1; i < v.size(); i++) {
      topri.push_back(make_pair(v[i].first, v[i - 1].first));
    }
  } else if (cnt == 1) {
    cout << "YES " << v.size() << endl;
    for (int i = 1; i < v.size(); i++) {
      topri.push_back(make_pair(v[i].first, v[i - 1].first));
    }
    topri.push_back(make_pair(o[0], v[0].first));
  } else {
    cout << "YES " << v.size() + 1 << endl;
    for (int i = 1; i < v.size(); i++) {
      topri.push_back(make_pair(v[i].first, v[i - 1].first));
      v[i].second -= 1;
      v[i - 1].second -= 1;
    }
    topri.push_back(make_pair(o[0], v[0].first));
    v[0].second -= 1;
    topri.push_back(make_pair(o[1], v[v.size() - 1].first));
    v[v.size() - 1].second -= 1;
    int k = 2;
    for (int i = 0; i < v.size(); i++) {
      while (v[i].second != 0) {
        if (k == o.size()) break;
        topri.push_back(make_pair(o[k], v[i].first));
        v[i].second -= 1;
        k++;
      }
    }
  }
  cout << topri.size() << endl;
  for (int i = 0; i < topri.size(); i++) {
    cout << topri[i].first << " " << topri[i].second << endl;
  }
  return 0;
}
