#include <bits/stdc++.h>
using namespace std;
long long powmod(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
void solve() {
  int n;
  cin >> n;
  vector<int> vp(n);
  int sum = 0;
  for (int &i : vp) {
    cin >> i;
    sum += i;
  }
  if (sum < (2 * (n - 1))) {
    cout << "NO\n";
    return;
  }
  vector<int> ones;
  for (int i = 0; i < n; i++)
    if (vp[i] == 1) {
      vp[i] = 0;
      ones.push_back(i);
    }
  int o = ones.size();
  int dia = (n - o - 1) + min(2, o);
  cout << "YES " << dia << '\n';
  cout << n - 1 << '\n';
  int lst = -1;
  if (!ones.empty()) {
    lst = ones.back();
    ones.pop_back();
  }
  for (int i = 0; i < n; i++) {
    if (vp[i] > 1) {
      if (lst != -1) {
        vp[i]--;
        vp[lst]--;
        cout << i + 1 << ' ' << lst + 1 << '\n';
      }
      lst = i;
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    while (!ones.empty() && vp[i] > 0) {
      vp[i]--;
      cout << i + 1 << ' ' << ones.back() + 1 << '\n';
      ones.pop_back();
    }
  }
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int tc = 1;
  while (tc--) solve();
}
