#include <bits/stdc++.h>
#pragma optimize("avx")
#pragma optimize("no-stack-protector")
namespace io {
inline char gnc() { return (char)getchar(); }
template <typename T>
inline void gi(T &dx) {
  dx = 0;
  int yc = gnc();
  bool nega = false;
  while (yc < '0' || yc > '9') {
    nega = (yc == '-' ? true : nega);
    yc = gnc();
  }
  while (yc >= '0' && yc <= '9') {
    dx = (T)(dx * 10 + yc - '0');
    yc = gnc();
  }
  if (nega) {
    dx = -dx;
  }
}
void gc(char &a) {
  do a = gnc();
  while (!isgraph(a));
}
void gss(char *c) {
  *c = gnc();
  while (!isgraph(*c)) *c = gnc();
  while (isgraph(*c)) *++c = gnc();
  *c = 0;
}
template <typename t1, typename t2>
inline void gi(t1 &a, t2 &b) {
  gi(a);
  gi(b);
}
template <typename t1, typename t2, typename t3>
inline void gi(t1 &a, t2 &b, t3 &c) {
  gi(a);
  gi(b);
  gi(c);
}
template <typename t1, typename t2, typename t3, typename t4>
inline void gi(t1 &a, t2 &b, t3 &c, t4 &d) {
  gi(a);
  gi(b);
  gi(c);
  gi(d);
}
template <typename t1, typename t2, typename t3, typename t4, typename t5>
inline void gi(t1 &a, t2 &b, t3 &c, t4 &d, t5 &e) {
  gi(a);
  gi(b);
  gi(c);
  gi(d);
  gi(e);
}
}  // namespace io
using namespace io;
using namespace std;
template <typename t1, typename t2>
inline int gcd(t1 x, t2 y) {
  return y > x ? gcd(y, x) : y ? gcd(y, x % y) : x;
}
template <typename t1, typename t2>
inline void exgcd(t1 a, t1 b, t2 &x, t2 &y) {
  if (!b) {
    x = 1;
    y = 0;
    return;
  }
  exgcd(b, a % b, x, y);
  int t = x;
  x = y;
  y = t - (a / b) * y;
}
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const int Rev = (MOD + 1) >> 1;
template <typename T>
inline void Sol(T &x) {
  if (x >= MOD) x -= MOD;
}
template <typename T1, typename T2>
inline int inc(T1 x, T2 y) {
  x += y;
  if (x >= MOD) x -= MOD;
  return x;
}
template <typename T1, typename T2>
inline int dec(T1 x, T2 y) {
  x += MOD - y;
  if (x >= MOD) x -= MOD;
  return x;
}
template <typename T1, typename T2>
inline long long mul(T1 x, T2 y) {
  long long res = (long long)x * y;
  return res >= MOD ? res % MOD : res;
}
template <typename t1, typename t2, typename t3>
inline long long mul(t1 x, t2 y, t3 z) {
  return mul(mul(x, y), z);
}
template <typename t1, typename t2, typename t3, typename t4>
inline long long mul(t1 a, t2 b, t3 c, t4 d) {
  return mul(mul(a, b), mul(c, d));
}
inline long long qpow(long long x, int y) {
  long long res = 1;
  for (; y; y >>= 1, x = x * x % MOD)
    if (y & 1) res = res * x % MOD;
  return res;
}
inline long long myinv(long long x) { return qpow(x, MOD - 2); }
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
template <typename T1, typename T2>
inline void Getmin(T1 &x, T2 y) {
  if (x > y) x = y;
}
template <typename T1, typename T2>
inline void Getmax(T1 &x, T2 y) {
  if (x < y) x = y;
}
const int maxn = 500 + 10;
int n, d[maxn];
struct node {
  int deg, id;
  node() {}
  inline bool operator<(const node &rhs) const { return deg > rhs.deg; }
} a[maxn];
vector<pair<int, int> > ans;
int main() {
  n = read();
  int all = 0;
  for (int i = 1; i <= n; i++) a[i].deg = read(), a[i].id = i, all += a[i].deg;
  if (all < (n - 1) * 2) return puts("NO"), 0;
  printf("YES ");
  sort(a + 1, a + 1 + n);
  int tag = n + 1;
  for (int i = 1; i <= n; i++)
    if (a[i].deg == 1) {
      tag = i;
      break;
    }
  if (tag == 1) {
    if (n == 1)
      return printf("0\n0"), 0;
    else if (n == 2)
      return printf("1\n%d\n%d %d\n", 1, 1, 2), 0;
    return 0;
  }
  if (tag == 2) {
    printf("%d\n", 1 + (n > 2));
    printf("%d\n", n - 1);
    for (int i = 2; i <= n; i++) printf("%d %d\n", a[i].id, a[1].id);
    return 0;
  }
  swap(a[tag - 1], a[2]);
  for (int i = 1; i < tag - 1; i++)
    ans.push_back(make_pair(i, i + 1)), --a[i].deg, --a[i + 1].deg;
  int len = tag - 1 - 1;
  for (int i = tag; i <= n; i++) {
    if (i == tag)
      ans.push_back(make_pair(i, 1)), --a[1].deg, ++len;
    else if (i == tag + 1) {
      if (a[tag - 1].deg) {
        ans.push_back(make_pair(tag - 1, i));
        --a[tag - 1].deg;
        ++len;
      } else {
        for (int j = 1; j < tag; j++)
          if (a[j].deg) {
            --a[j].deg;
            ans.push_back(make_pair(j, i));
            break;
          }
      }
    } else {
      for (int j = 1; j < tag; j++)
        if (a[j].deg) {
          --a[j].deg;
          ans.push_back(make_pair(j, i));
          break;
        }
    }
  }
  printf("%d\n%d\n", len, ans.size());
  for (pair<int, int> cur : ans)
    printf("%d %d\n", a[cur.first].id, a[cur.second].id);
  return 0;
}
