#include <bits/stdc++.h>
using namespace std;
int a[510];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> one, two;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) {
    if (a[i] == 1)
      one.push_back(i);
    else
      two.push_back(i);
  }
  vector<pair<int, int>> ans;
  int d = (int)two.size();
  for (int i = 1; i < (int)two.size(); ++i) ans.push_back({two[i - 1], two[i]});
  if (one.size()) {
    d++;
    if (two.empty()) goto fail;
    ans.push_back({one.back(), two.front()});
    one.pop_back();
  }
  if (one.size()) {
    d++;
    if (two.empty()) goto fail;
    ans.push_back({one.back(), two.back()});
    one.pop_back();
  }
  for (int i = 0; i < (int)one.size(); ++i) {
    while (two.size() && a[two.back()] <= 2) two.pop_back();
    if (two.empty()) goto fail;
    ans.push_back({one[i], two.back()});
    a[two.back()]--;
  }
  cout << "YES " << d - 1 << '\n';
  cout << ans.size() << '\n';
  assert((int)ans.size() == n - 1);
  for (auto t : ans) cout << t.first << ' ' << t.second << '\n';
  return 0;
fail:
  cout << "NO\n";
}
