#include <bits/stdc++.h>
using namespace std;
int n, sum, i, j;
int a[200010];
priority_queue<pair<int, int> > q;
vector<pair<int, int> > ans;
int main() {
  scanf("%d%d", &n, &sum);
  if (sum % 2 == 1) {
    printf("No\n");
    return 0;
  }
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i]) q.push(make_pair(a[i], i));
  }
  int step = 0;
  while (q.size()) {
    pair<int, int> t = q.top();
    q.pop();
    vector<pair<int, int> > nextiter;
    nextiter.clear();
    for (int i = 0; i < t.first; i++) {
      if (q.empty()) {
        printf("No\n");
        return 0;
      }
      pair<int, int> v = q.top();
      q.pop();
      ans.push_back(make_pair(t.second, v.second));
      v.first--;
      if (v.first) nextiter.push_back(v);
    }
    for (int i = 0; i < nextiter.size(); i++) q.push(nextiter[i]);
  }
  printf("Yes\n");
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i)
    printf("%d %d\n", ans[i].first, ans[i].second);
  return 0;
}
