#include <bits/stdc++.h>
using namespace std;
const long long LLMAX = 2e18;
const int MOD = 1e9 + 7;
const int MAXN = 1e6 + 10;
template <class T>
inline void read(T &DataIn) {
  DataIn = 0;
  T Flag = 0;
  char c = getchar();
  while (!isdigit(c)) {
    Flag |= c == '-';
    c = getchar();
  }
  while (isdigit(c)) {
    DataIn = DataIn * 10 + c - '0';
    c = getchar();
  }
  DataIn = Flag ? -DataIn : DataIn;
}
template <class T>
inline void write(T DataOut, char EndChar = '\n') {
  T lenth = 0, number[30];
  if (DataOut == 0) {
    putchar(48);
    putchar(EndChar);
    return;
  }
  while (DataOut > 0) {
    number[++lenth] = DataOut % 10;
    DataOut /= 10;
  }
  for (int i = lenth; i >= 1; i--) putchar(number[i] + 48);
  putchar(EndChar);
}
long long __gcd(long long a, long long b) {
  return b == 0 ? a : __gcd(b, a % b);
}
priority_queue<int, vector<int>, less<int> > qd;
priority_queue<int, vector<int>, greater<int> > qu;
pair<int, int> a[MAXN];
vector<pair<int, int> > ans;
int main(void) {
  FILE *fin = NULL, *fout = NULL;
  int n, sum = 0;
  cin >> n;
  for (int i = 0; i < n; i++)
    cin >> a[i].first, a[i].second = i + 1, sum += a[i].first;
  if (sum < 2 * n - 2)
    puts("NO");
  else {
    int cnt = 0, id = -1;
    sort(a, a + n);
    for (int i = 2; i < n; i++) {
      if (a[i].first >= 2) cnt++;
      if (a[i].first >= 2 && id == -1) id = i;
    }
    cout << "YES " << cnt + 1 << endl << n - 1 << endl;
    ans.push_back(pair<int, int>(a[0].second, a[id].second));
    a[id].first--;
    ans.push_back(pair<int, int>(a[1].second, a[n - 1].second));
    a[n - 1].first--;
    for (int i = id + 1; i < n; i++) {
      ans.push_back(pair<int, int>(a[i - 1].second, a[i].second));
      a[i - 1].first--, a[i].first--;
    }
    for (int i = 2; i < id; i++) {
      for (int j = id; j < n; j++)
        if (a[j].first) {
          ans.push_back(pair<int, int>(a[i].second, a[j].second));
          a[j].first--;
          break;
        }
    }
    for (int i = 0; i < ans.size(); i++)
      cout << ans[i].first << ' ' << ans[i].second << endl;
  }
  return 0;
}
