#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long arr[500005];
vector<long long> sh, sp;
void solve() {
  long long i, j, k, l, r, m, n, a, b, c, d, x, y, z, t;
  cin >> n;
  long long sum = 0;
  for (i = 1; i <= n; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  if (sum < 2 * n - 2) {
    cout << "NO" << endl;
    return;
  }
  if (n == 2) {
    cout << "YES" << ' ';
    cout << 1 << endl;
    cout << 1 << endl;
    cout << 1 << ' ' << 2 << endl;
    return;
  }
  cout << "YES" << ' ';
  for (i = 1; i <= n; i++) {
    if (arr[i] >= 2)
      sh.push_back(i);
    else
      sp.push_back(i);
  }
  x = sp.size();
  y = sh.size();
  cout << y - 1 + min(2LL, x) << endl;
  cout << n - 1 << endl;
  for (i = 1; i < sh.size(); i++) {
    cout << sh[i] << ' ' << sh[i - 1] << endl;
    arr[sh[i]]--;
    arr[sh[i - 1]]--;
  }
  if (sp.size()) {
    cout << sp.back() << ' ' << sh[0] << endl;
    sp.pop_back();
    arr[sh[0]]--;
  }
  if (sp.size()) {
    cout << sp.back() << ' ' << sh.back() << endl;
    sp.pop_back();
    arr[sh.back()]--;
  }
  long long cur = 0;
  for (auto &cv : sp) {
    while (arr[sh[cur]] <= 0) cur++;
    cout << sh[cur] << ' ' << cv << endl;
    arr[sh[cur]]--;
  }
  cout << endl;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
