#include <bits/stdc++.h>
using namespace std;
int n;
int a[505], vis[505];
int sum = 0;
vector<int> ans;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  int all = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
    if (a[i] >= 2) {
      all++;
      vis[i] = 1;
      ans.push_back(i);
    }
  }
  if (sum < 2 * (n - 1)) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES ";
  cout << min(all + 2 - 1, n - 1) << endl;
  cout << n - 1 << endl;
  for (int i = 0; i < ans.size() - 1; i++) {
    cout << ans[i] << ' ' << ans[i + 1] << endl;
    a[ans[i]]--;
    a[ans[i + 1]]--;
  }
  bool flag = false;
  int l = 0;
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      if (!flag) {
        cout << i << ' ' << ans[ans.size() - 1] << endl;
        flag = true;
      } else {
        while (a[ans[l]] <= 0) {
          l++;
        }
        cout << i << ' ' << ans[l] << endl;
        a[ans[l]]--;
      }
    }
  }
}
