#include <bits/stdc++.h>
using namespace std;
struct node {
  int ans[1003], num, id;
} a[1003];
struct node2 {
  int val, id;
} b[1003];
bool cmp(node2 a, node2 b) { return a.val < b.val; }
bool cmp2(node a, node b) { return a.id < b.id; }
int main() {
  int n, i, j, k, ok;
  while (~scanf("%d", &n)) {
    for (i = 0; i < n; i++) scanf("%d", &b[i].val), b[i].id = i;
    sort(b, b + n, cmp);
    for (i = 0; i < b[0].val; i++) a[0].ans[i] = 0;
    a[0].num = b[0].val, a[0].id = b[0].id;
    for (ok = 1, i = 1; i < n; i++) {
      if (b[i].val == a[i - 1].num) {
        for (j = b[i].val - 1; j >= 0; j--) {
          if (a[i - 1].ans[j] == 0) {
            a[i].ans[j] = 1;
            break;
          } else
            a[i].ans[j] = 0;
        }
        if (j == -1) {
          ok = 0;
          break;
        }
        for (k = j - 1; k >= 0; k--) a[i].ans[k] = a[i - 1].ans[k];
        a[i].num = a[i - 1].num, a[i].id = b[i].id;
      } else {
        for (j = a[i - 1].num - 1; j >= 0; j--) {
          if (a[i - 1].ans[j] == 0) {
            a[i].ans[j] = 1;
            break;
          } else
            a[i].ans[j] = 0;
        }
        if (j == -1) {
          ok = 0;
          break;
        }
        for (k = j - 1; k >= 0; k--) a[i].ans[k] = a[i - 1].ans[k];
        for (k = a[i - 1].num; k < b[i].val; k++) a[i].ans[k] = 0;
        a[i].num = b[i].val, a[i].id = b[i].id;
      }
    }
    if (ok) {
      sort(a, a + n, cmp2);
      printf("YES\n");
      for (i = 0; i < n; i++) {
        for (j = 0; j < a[i].num; j++) printf("%d", a[i].ans[j]);
        printf("\n");
      }
    } else
      printf("NO\n");
  }
  return 0;
}
