#include <bits/stdc++.h>
using namespace std;
char buf[1000][1005];
int main() {
  int N;
  scanf("%d", &N);
  int T[N];
  pair<int, int> T2[N];
  for (int i = 0; i < (N); i++) {
    scanf("%d", &T[i]);
    T2[i].first = T[i];
    T2[i].second = i;
  }
  sort(T2, T2 + N);
  if (T2[0].first == 0) {
    printf("NO\n");
    return 0;
  }
  for (int i = 0; i < (T2[0].first); i++) buf[0][i] = '0';
  buf[0][T2[0].first] = 0;
  for (int i = 1; i < N; i++) {
    for (int j = 0; j < (T2[i - 1].first); j++) buf[i][j] = buf[i - 1][j];
    int k = T2[i - 1].first - 1;
    while (k >= 0 && buf[i][k] == '1') {
      buf[i][k] = '0';
      k--;
    }
    if (k < 0) {
      printf("NO\n");
      return 0;
    }
    buf[i][k] = '1';
    for (int j = T2[i - 1].first; j < T2[i].first; j++) buf[i][j] = '0';
    buf[i][T2[i].first] = 0;
  }
  int rev[N];
  for (int i = 0; i < (N); i++) rev[T2[i].second] = i;
  printf("YES\n");
  for (int i = 0; i < (N); i++) printf("%s\n", buf[rev[i]]);
}
