#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:64000000")
int n;
pair<int, int> a[1 << 10];
int b[1 << 10];
int ans[1 << 10][1 << 10];
int len[1 << 10];
void answer(string s) {
  puts(s.c_str());
  if (s == "NO") exit(0);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < len[i]; ++j) printf("%d", ans[i][j]);
    puts("");
  }
  exit(0);
}
void init() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i].first);
    a[i].second = i;
  }
  sort(a, a + n);
}
void add(int x) {
  int dif = 1;
  while (x >= 0 && dif) {
    ++b[x];
    dif = 0;
    if (b[x] == 2) {
      dif = 1;
      b[x] = 0;
    }
    --x;
  }
  if (dif) answer("NO");
}
int main() {
  init();
  memset(b, 0, sizeof b);
  for (int i = 0; i < n; ++i) {
    int x = a[i].second;
    len[x] = a[i].first;
    for (int j = 0; j < a[i].first; ++j) {
      ans[x][j] = b[j];
    }
    if (i == n - 1) break;
    add(a[i].first - 1);
  }
  answer("YES");
  return 0;
}
