#include <bits/stdc++.h>
using namespace std;
const int maxn = 555;
pair<int, int> v[maxn];
vector<int> x, y;
bool cmp(pair<int, int> a, pair<int, int> b) { return a.first > b.first; }
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &v[i].first);
    v[i].second = i;
  }
  sort(v + 1, v + n + 1, cmp);
  int i = 1;
  v[0] = v[n];
  for (i = 1; i <= n - 2; ++i) {
    if (v[i].first > 1) {
      x.push_back(v[i - 1].second);
      y.push_back(v[i].second);
      v[i - 1].first -= 1;
      v[i].first -= 1;
    } else {
      break;
    }
  }
  x.push_back(v[i - 1].second);
  y.push_back(v[n - 1].second);
  v[i - 1].first -= 1;
  v[n - 1].first -= 1;
  int f = i;
  int j = 0;
  for (; i <= n - 2; ++i) {
    for (; j < i && v[j].first == 0; ++j) {
    }
    if (j == i) {
      puts("NO");
      return 0;
    }
    x.push_back(v[j].second);
    y.push_back(v[i].second);
    v[i].first -= 1;
    v[j].first -= 1;
  }
  printf("YES %d\n", f);
  printf("%d\n", (int)x.size());
  for (int i = 0; i < x.size(); ++i) {
    printf("%d %d\n", x[i], y[i]);
  }
  return 0;
}
