#include <bits/stdc++.h>
using namespace std;
long long int a[200005];
long long int n, sum;
void kill() {
  cout << "No" << endl;
  exit(0);
}
int main() {
  cin >> n >> sum;
  for (long long int i = 0; i < ((long long int)(n)); ++i) cin >> a[i];
  set<pair<long long int, long long int> > s;
  if (sum & 1) kill();
  for (long long int i = 0; i < ((long long int)(n)); ++i)
    s.insert(make_pair(a[i], i));
  vector<pair<long long int, long long int> > ans;
  while (((long long int)(s).size())) {
    set<pair<long long int, long long int> > next;
    pair<long long int, long long int> p = *s.rbegin();
    s.erase(*s.rbegin());
    while (p.first--) {
      if (((long long int)(s).size()) == 0) kill();
      pair<long long int, long long int> pp = *s.rbegin();
      s.erase(*s.rbegin());
      pp.first--;
      ans.push_back(make_pair(p.second, pp.second));
      if (pp.first) next.insert(pp);
    }
    for (__typeof((next).begin()) it = (next).begin(); it != (next).end(); it++)
      s.insert(*it);
  }
  cout << "Yes" << endl << ((long long int)(ans).size()) << endl;
  for (long long int i = 0;
       i < ((long long int)(((long long int)(ans).size()))); ++i)
    cout << ans[i].first + 1 << " " << ans[i].second + 1 << endl;
}
