#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool read(T &x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c<'0' | c> '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
const long long N = 100005;
const long long MOD = 1e9 + 7;
set<long long> v[N];
long long vis[N];
int main() {
  vector<long long> allone;
  vector<pair<long long, long long> > noone;
  long long n = ({
    long long a;
    read(a);
    a;
  });
  for (int i = 1; i <= n; i++) {
    long long x = ({
      long long a;
      read(a);
      a;
    });
    if (x == 1)
      allone.emplace_back(i);
    else
      noone.emplace_back(x, i);
  }
  sort(noone.begin(), noone.end());
  reverse(noone.begin(), noone.end());
  long long prev = -1;
  long long path = 0;
  for (auto it : noone) {
    long long c = it.first;
    long long node = it.second;
    if (prev == -1) {
      prev = node;
      while (allone.size() > 1) {
        if (c == 1) break;
        v[allone.back()].emplace(node);
        allone.pop_back();
        --c;
        path = 1;
      }
    } else {
      v[prev].emplace(node);
      --c;
      prev = node;
      ++path;
      while (allone.size() > 1) {
        if (c == 1) break;
        v[allone.back()].emplace(node);
        allone.pop_back();
        --c;
      }
    }
  }
  if (allone.size() && prev != -1)
    v[prev].emplace(allone.back()), ++path, allone.pop_back();
  vector<pair<long long, long long> > ans;
  for (long long i = 1; i <= n; ++i) {
    if (!v[i].size()) continue;
    vector<long long> temp;
    for (long long x : v[i]) {
      ans.emplace_back(x, i);
      temp.emplace_back(x);
    }
    for (long long y : temp) {
      if (v[y].find(i) != v[y].end()) v[y].erase(i);
    }
  }
  if (allone.size())
    puts("NO");
  else {
    cout << "YES" << ' ' << path << '\n';
    printf("%lld", (long long)ans.size()), printf("\n");
    for (auto it : ans) {
      printf("%lld", it.first), printf(" "), printf("%lld", it.second),
          printf("\n");
    }
  }
}
