#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-9;
pair<int, int> operator+(const pair<int, int>& p1, const pair<int, int>& p2) {
  return pair<int, int>(p1.first + p2.first, p1.second + p2.second);
}
pair<int, int> operator-(const pair<int, int>& p1, const pair<int, int>& p2) {
  return pair<int, int>(p1.first - p2.first, p1.second - p2.second);
}
int operator*(const pair<int, int>& p1, const pair<int, int>& p2) {
  return (p1.first * p2.first + p1.second * p2.second);
}
int operator^(const pair<int, int>& p1, const pair<int, int>& p2) {
  return (p1.first * p2.second - p1.second * p2.first);
}
int n;
int a[505];
int b[505];
int tot = 0;
int one;
void build() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i + 1];
    tot += a[i + 1];
    if (a[i + 1] == 1) one++, b[i + 1] = 1;
  }
}
void init() {}
void solve() {
  int prev = 0;
  vector<pair<int, int> > E;
  if (tot < 2 * (n - 1)) {
    puts("NO");
    return;
  }
  int head;
  int acc = 0;
  vector<pair<int, int> > rem;
  for (int i = 1; i <= n; i++) {
    if (!b[i]) {
      if (!prev) {
        prev = i;
        head = i;
      } else {
        E.push_back(pair<int, int>(prev, i));
        prev = i;
        acc++;
      }
      rem.push_back(pair<int, int>(i, a[i] - 2));
    }
  }
  int cnt = 0;
  int remcnt = 0;
  for (int i = 1; i <= n; i++) {
    if (b[i]) {
      if (cnt == 0) {
        E.push_back(pair<int, int>(head, i));
        acc++;
      } else if (cnt == 1) {
        E.push_back(pair<int, int>(prev, i));
        acc++;
      } else {
        while (rem[remcnt].second == 0) remcnt++;
        rem[remcnt].second = rem[remcnt].second - 1;
        E.push_back(pair<int, int>(i, rem[remcnt].first));
      }
      cnt++;
    }
  }
  printf("YES %d\n", acc);
  printf("%d\n", ((int)E.size()));
  for (auto x : E) {
    printf("%d %d\n", x.first, x.second);
  }
}
int main() {
  int _t = 1;
  build();
  while (_t--) {
    init();
    solve();
  }
  return 0;
}
