#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  scanf("%d%d", &n, &s);
  priority_queue<pair<int, int> > que;
  queue<pair<int, int> > que2;
  for (int i = 0; i < n; i++) {
    int num;
    scanf("%d", &num);
    que.push(make_pair(num, i + 1));
  }
  if (s % 2)
    printf("No\n");
  else {
    vector<pair<int, int> > res;
    while (!que.empty()) {
      pair<int, int> p = que.top();
      que.pop();
      int rest = p.first;
      int id = p.second;
      while (rest && !que.empty()) {
        pair<int, int> p2 = que.top();
        que.pop();
        if (p2.first > 0) {
          p2.first--;
          rest--;
          res.push_back(make_pair(id, p2.second));
          if (p2.first > 0) que2.push(p2);
        }
      }
      if (rest) break;
      while (!que2.empty()) {
        que.push(que2.front());
        que2.pop();
      }
    }
    if ((int)res.size() == s / 2) {
      printf("Yes\n");
      printf("%d\n", s / 2);
      for (int i = 0; i < s / 2; i++)
        printf("%d %d\n", res[i].first, res[i].second);
    } else
      printf("No\n");
  }
  return 0;
}
