#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  vector<int> ones;
  vector<int> bam;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1)
      ones.push_back(i);
    else
      sum += a[i];
  }
  int t = ones.size();
  if (sum < 2 * (n - t - 1) + t) {
    cout << "NO";
    return 0;
  }
  int d = n - t - 1 + min(2, t);
  cout << "YES " << d << "\n" << n - 1 << "\n";
  int lst = -1;
  if (!ones.empty()) {
    lst = ones.back();
    ones.pop_back();
  }
  for (int i = 0; i < n; i++) {
    if (a[i] > 1) {
      bam.push_back(i);
      if (lst != -1) {
        cout << lst + 1 << " " << i + 1 << "\n";
        a[i]--;
        a[lst]--;
      }
      lst = i;
    }
  }
  auto it1 = ones.begin();
  int i = bam.size() - 1;
  while (i >= 0 && it1 != ones.end()) {
    while (a[bam[i]] > 0 && it1 != ones.end()) {
      cout << bam[i] + 1 << " " << (*it1) + 1 << "\n";
      a[bam[i]]--;
      it1++;
    }
    i--;
  }
  return 0;
}
