#include <bits/stdc++.h>
using namespace std;
const int N = 600;
int ar[N], st;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, cnt = 0;
  cin >> n;
  vector<int> s, m, q;
  for (int i = 1; i <= n; ++i) {
    cin >> ar[i];
    if (ar[i] == 1) {
      s.push_back(i);
      cnt++;
    } else {
      m.push_back(i);
      st += ar[i];
      q.push_back(ar[i]);
    }
  }
  if (m.size() > 1) {
    long long x = m.size() - 2;
    x *= 2;
    st -= x;
    st -= 2;
  }
  if (st < s.size()) {
    cout << "NO";
    exit(0);
  }
  int d = m.size() - 1;
  if (s.size() < 2)
    d += s.size();
  else {
    d += 2;
  }
  vector<pair<int, int> > ans;
  if (m.size() > 1) {
    for (int i = 0; i < m.size() - 1; ++i) {
      ans.push_back(make_pair(m[i], m[i + 1]));
      q[i]--;
      q[i + 1]--;
    }
  }
  if (s.size() == 1) ans.push_back(make_pair(m[0], s[0]));
  if (s.size() >= 2) {
    ans.push_back(make_pair(m[0], s[0]));
    ans.push_back(make_pair(m[m.size() - 1], s[1]));
    q[0]--;
    q[m.size() - 1]--;
  }
  if (s.size() > 2) {
    int j = 0;
    for (int to = 2; to < s.size(); ++to) {
      if (q[j] > 0) {
        ans.push_back(make_pair(m[j], s[to]));
        q[j]--;
      } else {
        while (q[j] <= 0) j++;
        q[j]--;
        ans.push_back(make_pair(m[j], s[to]));
      }
    }
  }
  cout << "YES " << d << "\n";
  cout << ans.size() << "\n";
  for (auto to : ans) {
    cout << to.first << " " << to.second << "\n";
  }
}
