#include <bits/stdc++.h>
using namespace std;
int arr[600];
int main() {
  int n, i, j, k, l;
  cin >> n;
  int tot = 0;
  for (i = 1; i <= n; i++) {
    cin >> arr[i];
    tot += arr[i];
  }
  if (tot < (2 * (n - 1))) {
    cout << "NO" << endl;
    return 0;
  } else
    cout << "YES"
         << " ";
  vector<int> v;
  vector<int> u;
  vector<int> s;
  for (i = 1; i <= n; i++) {
    if (arr[i] == 1)
      v.push_back(i);
    else {
      u.push_back(i);
      s.push_back(i);
    }
  }
  if (v.size() <= 2)
    cout << (n - 1) << endl;
  else
    cout << (n - 1 - (v.size() - 2)) << endl;
  cout << (n - 1) << endl;
  for (i = 2; i < v.size(); i++) {
    while (1) {
      auto pk = (*s.rbegin());
      if (arr[pk] == 2) {
        s.pop_back();
      } else {
        arr[pk]--;
        cout << v[i] << " " << pk << endl;
        break;
      }
    }
  }
  int start, end;
  if (v.size() >= 2) {
    start = v[0];
    end = v[1];
  } else if (v.size() == 1) {
    start = v[0];
    auto jk = (*u.rbegin());
    end = jk;
    u.pop_back();
  } else {
    auto pk = (*u.rbegin());
    start = pk;
    u.pop_back();
    pk = (*u.rbegin());
    end = pk;
    u.pop_back();
  }
  for (i = 0; i < u.size(); i++) {
    cout << start << " " << u[i] << endl;
    start = u[i];
  }
  cout << start << " " << end << endl;
  return 0;
}
