#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  vector<long long int> deg1;
  vector<pair<long long int, long long int> > deg2;
  long long int sumDeg2 = 0;
  for (long long int i = 0; i < n; i++) {
    long long int deg;
    cin >> deg;
    if (deg == 1) {
      deg1.push_back(i + 1);
    } else {
      deg2.push_back(make_pair(i + 1, deg));
      sumDeg2 += deg;
    }
  }
  if (sumDeg2 - 2 * (((int)(deg2).size()) - 1) < ((int)(deg1).size())) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES " << ((int)(deg2).size()) + min(((int)(deg1).size()), 2) - 1
       << endl;
  cout << n - 1 << endl;
  for (long long int i = 1; i < ((int)(deg2).size()); i++) {
    cout << deg2[i - 1].first << " " << deg2[i].first << endl;
    deg2[i - 1].second--;
    deg2[i].second--;
  }
  if (((int)(deg1).size()) > 0) {
    cout << deg1[((int)(deg1).size()) - 1] << " "
         << deg2[((int)(deg2).size()) - 1].first << endl;
    deg2[((int)(deg2).size()) - 1].second--;
  }
  long long int ptr2 = 0;
  for (long long int i = 0; i < ((int)(deg1).size()) - 1; i++) {
    while (deg2[ptr2].second == 0) {
      ptr2++;
    }
    cout << deg1[i] << " " << deg2[ptr2].first << endl;
    deg2[ptr2].second--;
  }
  return 0;
}
