#include <bits/stdc++.h>
using namespace std;
double pi = acos(-1.0);
int mod = 1e9 + 7;
const double eps = (double)1e-9;
const long long INF = 1e18 + 7;
int n;
int a[100100];
vector<int> cntb, cntl;
vector<pair<int, int> > ans;
int degree[100100];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i], degree[i] = a[i];
  for (int i = 1; i <= n; i++) {
    if (a[i] > 1)
      cntb.push_back(i);
    else
      cntl.push_back(i);
  }
  if (cntb.size() == 0) {
    cout << "NO";
    return 0;
  }
  for (int i = 0; i < int(cntb.size()) - 1; i++) {
    int x = cntb[i];
    if (i == 0) {
      degree[x]--;
      ans.push_back(make_pair(cntb[i], cntb[i + 1]));
    } else {
      degree[x] -= 2;
      ans.push_back(make_pair(cntb[i], cntb[i + 1]));
    }
  }
  if (cntb.size() != 1) degree[cntb.back()]--;
  int cnt = max(0, int(cntb.size()) - 1);
  int st = cntb[0];
  int ok = 0;
  if (degree[st] != 0 && cntl.size() != 0) {
    int x = cntl.back();
    ans.push_back(make_pair(st, x));
    ok = 1;
    degree[st]--;
    degree[x]--;
    cntl.pop_back();
  }
  int fn = cntb.back();
  if (ok) cnt++;
  ok = 0;
  if (degree[fn] != 0 && cntl.size() != 0) {
    int x = cntl.back();
    ans.push_back(make_pair(fn, x));
    ok = 1;
    degree[fn]--;
    degree[x]--;
    cntl.pop_back();
  }
  if (ok) cnt++;
  for (int i = 0; i < int(cntb.size()); i++) {
    int q = cntb[i];
    while (degree[q] != 0) {
      if (cntl.size() == 0) break;
      int x = cntl.back();
      ans.push_back(make_pair(q, x));
      degree[q]--;
      degree[x]--;
      cntl.pop_back();
    }
  }
  for (int i = 0; i < cntb.size(); i++) {
    int x = cntb[i];
    if (degree[x] == a[x]) {
      cout << x << "\n";
      cout << "NO";
      return 0;
    }
  }
  for (int i = 0; i < cntl.size(); i++) {
    int x = cntl[i];
    if (degree[x] == a[x]) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES"
       << " " << cnt << "\n";
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].first << " " << ans[i].second << "\n";
  }
}
