#include <bits/stdc++.h>
using namespace std;
int n, m, i, j, x, a[505], seq[505], ans = 0;
vector<int> s1, s2;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] > 1) {
      ans++;
      seq[ans] = i;
      if (ans > 1) {
        s1.push_back(seq[ans]);
        s2.push_back(seq[ans - 1]);
      }
    }
  }
  int ans2 = ans - 1;
  for (i = 1; i <= n; i++) {
    if (a[i] == 1) {
      s1.push_back(seq[1]);
      s2.push_back(i);
      a[i] = 0;
      ans2++;
      break;
    }
  }
  for (i = 1; i <= n; i++) {
    if (a[i] == 1) {
      s1.push_back(seq[ans]);
      s2.push_back(i);
      a[i] = 0;
      ans2++;
      break;
    }
  }
  int j = 1;
  for (i = 1; i <= n; i++) {
    if (a[i] == 1) {
      while (j <= ans && a[seq[j]] <= 2) j++;
      if (j > ans) {
        puts("NO");
        return 0;
      }
      a[seq[j]]--;
      s1.push_back(seq[j]);
      s2.push_back(i);
    }
  }
  printf("YES %d\n%d\n", ans2, (int)s1.size());
  for (i = 0; i < s1.size(); i++) {
    printf("%d %d\n", s1[i], s2[i]);
  }
  return 0;
}
