#include <bits/stdc++.h>
using namespace std;
inline void Boost() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (auto &it : v) cin >> it;
  int sum = 0;
  for (auto &it : v) sum += it;
  if (sum < 2 * n - 2) {
    cout << "NO";
    return 0;
  }
  vector<int> ones;
  for (int i = 0; i < n; i++)
    if (v[i] == 1) {
      v[i] = 0;
      ones.push_back(i);
    }
  int t = ones.size();
  int dm = (n - t) - 1 + min(2, t);
  cout << "YES " << dm << "\n" << n - 1 << "\n";
  int lst = -1;
  if (!ones.empty()) {
    lst = ones.back();
    ones.pop_back();
  }
  for (int i = 0; i < n; i++)
    if (v[i] > 1) {
      if (lst != -1) {
        v[lst]--;
        v[i]--;
        cout << lst + 1 << " " << i + 1 << "\n";
      }
      lst = i;
    }
  for (int i = n - 1; i >= 0; i--)
    while (!ones.empty() && v[i] > 0) {
      v[i]--;
      cout << i + 1 << " " << ones.back() + 1 << "\n";
      ones.pop_back();
    }
  return 0;
}
