#include <bits/stdc++.h>
using namespace std;
int deg[555];
vector<int> one, two;
bool is_one[555];
vector<int> edge[555];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &deg[i]);
  int sum = 0;
  for (int i = 1; i <= n; i++) sum += deg[i];
  if (sum < ((n - 1) << 1)) {
    printf("NO");
    return 0;
  }
  int dia, cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (deg[i] == 1)
      one.push_back(i);
    else
      two.push_back(i);
  }
  dia = (n + 1) - max(2, (int)one.size());
  int a, b;
  if (!one.empty())
    a = one.back(), one.pop_back();
  else
    a = two.back(), two.pop_back();
  if (!one.empty())
    b = one.back(), one.pop_back();
  else
    b = two.back(), two.pop_back();
  int ans = 0;
  edge[a].push_back(two[0]);
  edge[two[0]].push_back(a);
  ans++;
  for (int i = 1; i < two.size(); i++) {
    edge[two[i - 1]].push_back(two[i]);
    edge[two[i]].push_back(two[i - 1]);
    ans++;
  }
  edge[b].push_back(two[two.size() - 1]);
  edge[two[two.size() - 1]].push_back(b);
  ans++;
  for (int v : two) deg[v] -= 2;
  while (!one.empty()) {
    while (!two.empty() && !deg[two.back()]) two.pop_back();
    edge[one.back()].push_back(two.back());
    edge[two.back()].push_back(one.back());
    ans++;
    one.pop_back();
    deg[two.back()]--;
  }
  printf("YES %d\n", dia);
  printf("%d\n", ans);
  for (int i = 1; i <= n; i++)
    for (int v : edge[i])
      if (i < v) printf("%d %d\n", i, v);
  return 0;
}
