#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize(4)
using namespace std;
const int N = 555;
int a[N];
vector<int> leaf, vc;
vector<pair<int, int> > ans;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 1)
      leaf.push_back(i);
    else
      vc.push_back(i);
  }
  int tot = 0;
  for (int v : vc) tot += a[v] - 2;
  tot += 2;
  if (tot >= leaf.size()) {
    int d = vc.size();
    for (int i = 1; i < vc.size(); i++) ans.push_back({vc[i], vc[i - 1]});
    if (leaf.size() > 0)
      ans.push_back({leaf[0], vc[0]}), leaf.erase(leaf.begin()), d++;
    if (leaf.size() > 0)
      ans.push_back({leaf[0], vc.back()}), leaf.erase(leaf.begin()), d++;
    for (int i = 0; i < vc.size(); i++) {
      for (int j = 0; j < a[vc[i]] - 2; j++) {
        if (leaf.size() > 0) {
          ans.push_back({leaf[0], vc[i]}), leaf.erase(leaf.begin());
        } else
          break;
      }
      if (leaf.size() == 0) break;
    }
    printf("YES %d\n", d - 1);
    printf("%d\n", (int)ans.size());
    for (pair<int, int> p : ans) printf("%d %d\n", p.first, p.second);
  } else
    puts("NO");
  return 0;
}
