#include <bits/stdc++.h>
namespace std {
long long abs(long long x) { return x < 0 ? -x : x; }
}  // namespace std
using namespace std;
void dprintf(char* format, ...) {
  fprintf(stderr, "DEBUG: ");
  va_list argp;
  va_start(argp, format);
  vfprintf(stderr, format, argp);
  va_end(argp);
  fprintf(stderr, "\n");
}
struct Exception {
  const char* message;
  const int line;
  Exception(const char* m, int l) : message(m), line(l) {}
};
static char stringReader[2097152];
static inline bool ReadLine() {
  char* ptr = fgets(stringReader, sizeof(stringReader), stdin);
  if (ptr == 0) return false;
  int N = strlen(stringReader);
  if (stringReader[N - 1] == '\n') stringReader[N - 1] = 0;
  return true;
}
const long long ooLL = 0x3f3f3f3f3f3f3f3fLL;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
struct Word {
  int i;
  int len;
  string w;
};
struct Cmp {
  int type;
  Cmp(int t) : type(t) {}
  bool operator()(const Word& a, const Word& b) const {
    if (type)
      if (a.len != b.len) return a.len > b.len;
    return a.i < b.i;
  }
};
int main() {
  try {
    int N;
    scanf("%d", &N);
    vector<Word> words(N);
    for (int i = 0; i < N; ++i) {
      scanf("%d", &words[i].len);
      words[i].i = i;
    }
    sort((words).begin(), (words).end(), Cmp(1));
    words[0].w = string(words[0].len, '0');
    bool ok = true;
    for (int i = 1; ok && i < N; ++i) {
      string p(words[i].len, '0');
      for (int j = 0; j < i; ++j)
        p = max(p, words[j].w.substr(0, words[i].len));
      int o = p.find_last_of('0');
      if ((ok = o >= 0)) {
        p[o] = '1';
        while (++o < words[i].len) p[o] = '0';
      }
      words[i].w = p;
    }
    if (ok) {
      sort((words).begin(), (words).end(), Cmp(0));
      printf("YES\n");
      for (int i = 0; i < N; ++i) printf("%s\n", words[i].w.c_str());
    } else
      printf("NO\n");
    return 0;
  } catch (const Exception& exception) {
    fprintf(stderr, "******************************\n");
    fprintf(stderr, "ERROR.%d: %s\n", exception.line, exception.message);
    fprintf(stderr, "******************************\n");
    throw exception;
  }
}
