#include <bits/stdc++.h>
char use[1001] = {0}, hash[1001] = {0}, ans[1001][1005] = {0};
long p[1001] = {0};
int main() {
  long i, x, j, n;
  scanf("%ld", &n);
  for (i = 1; i <= n; i++) scanf("%ld", &p[i]);
  for (i = 1; i <= n; i++) {
    x = 0;
    for (j = 1; j <= n; j++)
      if (!use[j] && (!x || p[j] < p[x])) x = j;
    use[x] = 1;
    for (j = 1; j <= p[x]; j++) ans[x][j] = hash[j] + '0';
    if (hash[0]) break;
    hash[p[x]]++;
    for (j = p[x]; j >= 1 && hash[j] == 2; j--) {
      hash[j - 1]++;
      hash[j] = 0;
    }
  }
  if (i <= n)
    printf("NO\n");
  else {
    printf("YES\n");
    for (i = 1; i <= n; i++) puts(ans[i] + 1);
  }
  return 0;
}
