#include <bits/stdc++.h>
using namespace std;
int n, i, b[504], a[504], sum = 0, num = 0, j, lt = 0;
vector<int> A, B;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = a[i];
    if (a[i] == 1) num++;
    sum += a[i];
  }
  if (2 * (n - 1) > sum) {
    cout << "NO";
    return 0;
  }
  printf("YES %d\n%d\n", min(n - 1, n - num - 1 + min(2, num)), n - 1);
  for (i = 1; i <= n; i++) {
    if (a[i] != 1) {
      if (lt) {
        printf("%d %d\n", lt, i);
        b[lt]--;
        b[i]--;
      }
      A.push_back(i);
      lt = i;
    } else {
      B.push_back(i);
    }
  }
  if (A.size() > 1) swap(A[1], A[A.size() - 1]);
  j = 0;
  for (i = 0; i < B.size(); i++) {
    for (;;) {
      if (j == A.size()) j = 0;
      if (b[A[j]] > 0) {
        printf("%d %d\n", B[i], A[j]);
        b[A[j]]--;
        j++;
        break;
      }
      j++;
    }
  }
}
