#include <bits/stdc++.h>
using namespace std;
int n, m = -1, j, t, a[1024], f[1024][1024], x[1024], y[1024];
bool cmp(int x, int y) {
  if (a[x] < a[y]) return true;
  return false;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > m) m = a[i];
    y[i] = i;
  }
  sort(y, y + n, cmp);
  for (int i = 1; i <= m * 2 + 1; i++)
    while (j < n && a[y[j]] == i) {
      for (int k = 0; k < i; k++) f[y[j]][k] = x[k];
      t = -1;
      for (int k = i - 1; k >= 0; k--)
        if (x[k] == 0) {
          t = k;
          break;
        } else
          x[k] = 0;
      if (t < 0 && j < n - 1) {
        cout << "NO" << endl;
        return 0;
      }
      if (t >= 0) x[t] = 1;
      j++;
    }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) {
    for (j = 0; j < a[i]; j++) cout << f[i][j];
    cout << endl;
  }
  return 0;
}
