#include <bits/stdc++.h>
using namespace std;
const int maxn = 505;
int n, in[maxn], sta[maxn];
vector<int> G[maxn];
queue<int> P;
bool vis[maxn];
int main() {
  scanf("%d", &n);
  int cnt = 0, last = 0, st = -1, d = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &in[i]);
    if (in[i] == 1)
      P.push(i);
    else if (last == 0)
      last = i, vis[i] = 1, st = i;
    else {
      vis[i] = 1;
      G[last].push_back(i);
      in[last]--;
      in[i]--;
      last = i;
      d++;
    }
  }
  if (st != -1 && in[st] && !P.empty())
    G[st].push_back(P.front()), P.pop(), in[st]--, d++;
  if (last && in[last] && !P.empty())
    G[last].push_back(P.front()), P.pop(), in[last]--, d++;
  for (int i = 1; i <= n; i++) {
    while (vis[i] && in[i] && !P.empty()) {
      G[i].push_back(P.front());
      P.pop();
      in[i]--;
    }
  }
  if (!P.empty())
    printf("NO\n");
  else {
    printf("YES %d\n", d);
    printf("%d\n", n - 1);
    for (int i = 1; i <= n; i++)
      for (int j = 0; j < G[i].size(); j++) printf("%d %d\n", i, G[i][j]);
  }
  return 0;
}
