#include <bits/stdc++.h>
using namespace std;
const int N = 200031;
int n;
int deg[N], in_chain[N];
int s_deg;
vector<int> leaves, non_leaves;
vector<pair<int, int> > ans;
int get_free() {
  for (int i = 1; i <= n; i++) {
    if (in_chain[i] == 1 && deg[i] > 0) {
      return i;
    }
  }
  return -1;
}
void add_edge(int a, int b) {
  deg[a]--;
  deg[b]--;
  ans.push_back(make_pair(a, b));
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> deg[i];
    s_deg += deg[i];
    if (deg[i] == 1)
      leaves.push_back(i);
    else
      non_leaves.push_back(i), in_chain[i] = 1;
  }
  if (s_deg < 2 * n - 2) {
    cout << "NO" << endl;
    return 0;
  }
  int Ans = non_leaves.size() - 1;
  if (leaves.size() > 0) Ans++;
  if (leaves.size() > 1) Ans++;
  cout << "YES"
       << " " << Ans << endl;
  for (int i = 1; i < non_leaves.size(); i++) {
    add_edge(non_leaves[i - 1], non_leaves[i]);
  }
  for (int i = 0; i < leaves.size(); i++) {
    if (i == 1)
      add_edge(leaves[i], non_leaves[non_leaves.size() - 1]);
    else {
      int p = get_free();
      add_edge(leaves[i], p);
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].first << " " << ans[i].second << endl;
  }
  return 0;
}
