#include <bits/stdc++.h>
using namespace std;
const int N = 505;
int n, d[N];
vector<int> a, b;
vector<pair<int, int> > res;
int main() {
  int s = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &d[i]);
    if (d[i] == 1)
      a.push_back(i);
    else
      b.push_back(i), s += d[i] - 2;
  }
  if ((int)a.size() - 2 > s)
    puts("NO");
  else {
    int ans = b.size() + min((int)a.size(), 2);
    printf("YES %d\n", ans - 1);
    if (b.size() == 0) {
      puts("1 2");
      return 0;
    }
    for (int i = 0; i < b.size() - 1; i++)
      res.push_back(pair<int, int>(b[i], b[i + 1]));
    if (a.size() >= 1) res.push_back(pair<int, int>(b[0], a[0]));
    if (a.size() >= 2) res.push_back(pair<int, int>(b[b.size() - 1], a[1]));
    int j = 0;
    for (int i = 2; i < a.size(); i++) {
      while (d[b[j]] <= 2) j++;
      res.push_back(pair<int, int>(a[i], b[j]));
      d[b[j]]--;
    }
    printf("%d\n", res.size());
    for (auto p : res) printf("%d %d\n", p.first, p.second);
  }
}
