#include <bits/stdc++.h>
using namespace std;
int a[510];
int b[2][510];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int cnt = 2;
  for (int i = 1; i <= n; i++)
    if (a[i] == 1)
      b[0][++b[0][0]] = i;
    else {
      cnt += a[i] - 2;
      b[1][++b[1][0]] = i;
    }
  if (cnt < b[0][0])
    cout << "NO" << endl;
  else if (b[1][0] == 0 && b[0][0] != 1)
    cout << "NO" << endl;
  else if (b[0][0] == 1 && b[1][0] == 0)
    cout << "YES 1" << endl;
  else {
    int ans = b[1][0] - 1;
    ans += (b[0][0] >= 2 ? 2 : b[0][0]);
    cout << "YES " << ans << endl;
    cout << n - 1 << endl;
    if (b[0][0] > 0) cout << b[0][1] << " " << b[1][1] << endl;
    for (int i = 1; i < b[1][0]; i++)
      cout << b[1][i] << " " << b[1][i + 1] << endl;
    if (b[0][0] > 1) cout << b[1][b[1][0]] << " " << b[0][2] << endl;
    int k = 3;
    for (int i = 1; i <= b[1][0]; i++)
      for (int j = 3; j <= a[b[1][i]]; j++) {
        if (k > b[0][0]) break;
        cout << b[1][i] << " " << b[0][k++] << endl;
      }
  }
}
