#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1001;
string s[MAXN];
struct node {
  int len;
  int index;
} f[MAXN];
inline bool cmp(const node &a, const node &b) {
  if (a.len != b.len) return a.len < b.len;
  return a.index < b.index;
}
inline void gao(const int n) {
  int i, j, k;
  int len, cur, pre;
  cur = f[0].index;
  for (i = 0; i < f[0].len; ++i) s[cur] += '0';
  for (i = 1; i < n; ++i) {
    cur = f[i].index;
    pre = f[i - 1].index;
    s[cur] = s[pre];
    len = s[cur].length();
    k = len - 1;
    while (k >= 0 && s[cur][k] == '1') --k;
    if (k == -1) {
      puts("NO");
      return;
    }
    s[cur][k] = '1';
    for (j = k + 1; j < len; ++j) s[cur][j] = '0';
    for (j = f[i - 1].len; j < f[i].len; ++j) s[cur] += '0';
  }
  puts("YES");
  for (i = 0; i < n; ++i) puts(s[i].c_str());
}
int main() {
  int i, j, k;
  int n;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < n; ++i) {
      scanf("%d", &f[i].len);
      f[i].index = i;
      s[i].clear();
    }
    sort(f, f + n, cmp);
    gao(n);
  }
  getchar();
  return 0;
}
