#include <bits/stdc++.h>
using namespace std;
vector<int> one;
int a[555];
int main() {
  int n, sum = 0, o = 0, ist = -1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
    if (a[i] == 1) {
      one.push_back(i);
      a[i] = 0;
    }
  }
  if (sum < (2 * n - 2)) {
    cout << "NO" << endl;
    return 0;
  }
  o = one.size();
  int dm = (n - o) + min(2, o) - 1;
  cout << "YES " << dm << endl;
  cout << n - 1 << endl;
  if (!one.empty()) {
    ist = one.back();
    one.pop_back();
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] > 1) {
      if (ist != (-1)) {
        a[ist]--;
        a[i]--;
        printf("%d %d\n", ist, i);
      }
      ist = i;
    }
  }
  for (int i = n; i >= 1; i--) {
    while (!one.empty() && a[i] > 0) {
      a[i]--;
      printf("%d %d\n", i, one.back());
      one.pop_back();
    }
  }
  return 0;
}
