#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  scanf("%d", &n);
  int len = 0, exr = 0;
  vector<int> one;
  vector<pair<int, int>> extr;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a);
    if (a == 1) {
      one.push_back(i);
    } else if (a >= 2) {
      len++;
      exr += a - 2;
      extr.push_back(make_pair(i, a - 2));
    }
  }
  if (exr + 2 < one.size()) {
    printf("NO\n");
  } else {
    if (one.size() >= 2) {
      len++;
    } else if (one.size() == 0) {
      len--;
    }
    printf("YES %d\n%d\n", len, extr.size() - 1 + one.size());
    int none = min(2, (int)one.size());
    extr[0].second++;
    extr[extr.size() - 1].second++;
    if (none > 0) {
      while (extr[extr.size() - 1].second == 0) {
        extr.pop_back();
      }
      printf("%d %d\n", extr[extr.size() - 1].first, one[one.size() - 1]);
      extr[extr.size() - 1].second--;
      one.pop_back();
      if (none > 1) {
        for (int i = 0; i < extr.size(); i++) {
          if (extr[i].second != 0) {
            printf("%d %d\n", extr[i].first, one[one.size() - 1]);
            extr[i].second--;
            one.pop_back();
            break;
          }
        }
      }
    }
    for (int i = 0; i < extr.size() - 1; i++) {
      printf("%d %d\n", extr[i].first, extr[i + 1].first);
    }
    for (int i = 0; i < one.size(); i++) {
      int extrsz = extr.size();
      while (extr[extrsz - 1].second == 0) {
        extr.pop_back();
        extrsz--;
      }
      printf("%d %d\n", extr[extrsz - 1].first, one[i]);
      extr[extrsz - 1].second--;
    }
  }
  return 0;
}
