#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  pair<int, int> a[n];
  for (int i = 0; i < n; ++i) {
    cin >> a[i].first;
    a[i].second = i + 1;
  }
  sort(a, a + n);
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i].first != 1) break;
    ++cnt;
  }
  if (cnt == 0) {
    cout << "YES " << n - 1 << endl;
    cout << n - 1 << endl;
    for (int i = 0; i < n - 1; ++i) cout << i + 1 << " " << i + 2 << endl;
  } else if (cnt > 0 && cnt < 3) {
    cout << "YES " << n - 1 << endl;
    cout << n - 1 << endl;
    swap(a[1], a[n - 1]);
    for (int i = 0; i < n - 1; ++i)
      cout << a[i].second << ' ' << a[i + 1].second << endl;
  } else {
    if (a[n - 2] > a[cnt]) swap(a[n - 2], a[cnt]);
    for (int i = cnt; i < n - 1; ++i) {
      a[i].first--;
      a[i + 1].first--;
    }
    int space = 0;
    for (int i = cnt; i < n; ++i) {
      space += a[i].first;
    }
    if (space < cnt)
      cout << "NO" << endl;
    else {
      cout << "YES " << n - cnt + 1 << "\n";
      cout << n - 1 << endl;
      for (int i = cnt; i < n - 1; ++i) {
        cout << a[i].second << ' ' << a[i + 1].second << endl;
      }
      cout << (a[n - 1].second) << " " << a[0].second << endl;
      a[n - 1].first--;
      cout << (a[cnt].second) << " " << a[1].second << endl;
      a[cnt].first--;
      for (int i = 2, j = cnt; i < cnt; ++i) {
        while (a[j].first && i < cnt) {
          cout << a[i++].second << " " << a[j].second << endl;
          a[j].first--;
        }
        i--;
        ++j;
      }
    }
  }
}
