#include <bits/stdc++.h>
const double PI = 3.141592653589793238460;
using namespace std;
void solve() {
  int n, w = 0, x = 0, y = 0, z = 0;
  cin >> n;
  pair<int, int> a[n + 5];
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (x > 1) {
      y++;
      w += x;
    } else
      z++;
    a[i] = {x, i};
  }
  w -= 2 * (y - 1);
  if (z > w) {
    cout << "NO";
    return;
  }
  sort(a + 1, a + n + 1);
  cout << "YES " << (y - 1 + ((z > 2) ? (2) : (z)));
  cout << '\n' << (y - 1 + z) << '\n';
  for (int i = 1; i < y; i++) {
    cout << a[z + i].second << " " << a[z + i + 1].second << '\n';
    a[z + i + 1].first--;
    a[z + i].first--;
  }
  int e = 0;
  for (int i = 1; i <= z; i++) {
    cout << a[i].second << " ";
    if (i != 2) {
      if (a[n - e].first == 0) e++;
      a[n - e].first--;
      cout << a[n - e].second << '\n';
    } else {
      cout << a[z + 1].second << '\n';
      a[z + 1].first--;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
