#include <bits/stdc++.h>
using namespace std;
int a[505];
vector<int> b[2];
vector<pair<int, int> > ans;
vector<int> branch;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 1)
      b[0].push_back(i);
    else
      b[1].push_back(i);
  }
  if (b[0].size()) {
    branch.push_back(b[0].back());
    b[0].pop_back();
  }
  for (int i = 0; i < b[1].size(); i++) {
    branch.push_back(b[1][i]);
  }
  if (b[0].size()) {
    branch.push_back(b[0].back());
    b[0].pop_back();
  }
  int len = branch.size();
  for (int i = 1; i < branch.size(); i++) {
    ans.push_back({branch[i - 1], branch[i]});
    a[branch[i - 1]]--;
    a[branch[i]]--;
  }
  int p = 0;
  for (int i = 0; i < b[0].size(); i++) {
    while (p < branch.size() && a[branch[p]] == 0) p++;
    if (p == branch.size()) return 0 * printf("NO\n");
    a[branch[p]]--;
    ans.push_back({branch[p], b[0][i]});
  }
  printf("YES %d\n", len - 1);
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) {
    printf("%d %d\n", ans[i].first, ans[i].second);
  }
}
