#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e2 + 10;
vector<int> vec;
int arr[maxn], n, sum;
void input() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
}
void init() {
  for (int i = 0; i < n; i++) {
    sum += arr[i];
    if (arr[i] == 1) vec.push_back(i), arr[i]--;
  }
}
int main() {
  input();
  init();
  if (sum < 2 * n - 2) return cout << "NO" << endl, 0;
  int dm = n - 1 - vec.size() + min(2, (int)vec.size());
  cout << "YES " << dm << endl;
  cout << n - 1 << endl;
  int v = -1;
  if (vec.size()) v = vec.back(), vec.pop_back();
  for (int i = 0; i < n; i++) {
    if (v != -1) {
      if (arr[i] > 1)
        arr[i]--, arr[v]--, cout << v + 1 << " " << i + 1 << endl, v = i;
    } else
      v = i;
  }
  if (vec.size())
    cout << vec.back() + 1 << " " << v + 1 << endl, arr[vec.back()]--, arr[v]--,
        vec.pop_back();
  for (int i = 0; i < n; i++)
    while (arr[i] > 0 && vec.size())
      cout << vec.back() + 1 << " " << i + 1 << endl, arr[vec.back()]--,
          arr[i]--, vec.pop_back();
}
