#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> o;
vector<pair<int, int> > p;
vector<vector<int> > a;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  a.resize(n);
  int x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x == 1)
      o.push_back(i);
    else
      p.push_back({i, x});
  }
  while (o.size() < 2) {
    o.push_back(p.back().first);
    p.pop_back();
  }
  int id = 0, k = 0, e = 0;
  for (int i = 2; (i < o.size() && id < p.size()); i++) {
    while (id < p.size() && p[id].second <= 2) id++;
    if (id < p.size() && p[id].second > 2) {
      p[id].second--;
      a[o[i]].push_back(p[id].first);
      e++;
      k++;
    }
  }
  if (k < o.size() - 2) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES " << p.size() + 1 << "\n";
  a[o[0]].push_back(p[0].first);
  a[o[1]].push_back(p[p.size() - 1].first);
  e += 2;
  for (int i = 1; i < p.size(); i++) {
    a[p[i - 1].first].push_back(p[i].first);
    e++;
  }
  cout << e << "\n";
  for (int i = 0; i < n; i++)
    for (int j = 0; j < a[i].size(); j++)
      cout << i + 1 << ' ' << a[i][j] + 1 << "\n";
  return 0;
}
