#include <bits/stdc++.h>
using namespace std;
struct wr {
  int l, ind;
} a[1111];
bool cmp(wr a, wr b) { return (a.l < b.l || (a.l == b.l && a.ind < b.ind)); }
int res[1111][1111];
int main() {
  int n, i, k, p, j, d[1111];
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i].l);
    a[i].ind = i;
    d[i] = a[i].l;
  }
  sort(a, a + n, cmp);
  for (i = 0; i < a[i].l; i++) res[a[i].ind][i] = 0;
  for (i = 1; i < n; i++) {
    k = a[i].ind;
    for (j = 0; j < a[i - 1].l; j++) res[k][j] = res[a[i - 1].ind][j];
    p = a[i - 1].l - 1;
    while (res[k][p] == 1) p--;
    if (p < 0) {
      printf("NO\n");
      return 0;
    } else {
      res[k][p] = 1;
      for (j = p + 1; j < a[i].l; j++) res[k][j] = 0;
    }
  }
  printf("YES\n");
  for (i = 0; i < n; i++) {
    for (j = 0; j < d[i]; j++) printf("%d", res[i][j]);
    printf("\n");
  }
  return 0;
}
