#include <bits/stdc++.h>
using namespace std;
int n, r[1005], o[1005];
char s[1005], out[1005][1005];
bool f1(int i, int j) { return r[i] < r[j]; }
bool add(int z) {
  for (int i = 0; i < z; i++) {
    if (s[i] != '1') {
      for (int j = z - 1; j >= 0; j--) {
        if (s[j] == '0') {
          s[j] = '1';
          return true;
        } else {
          s[j] = '0';
        }
      }
    }
  }
  return false;
}
void solve() {
  for (int i = 0; i < r[o[0]]; i++) {
    s[i] = '0';
  }
  s[r[o[0]]] = '\0';
  for (int i = 1; i < n; i++) {
    if (add(r[o[i - 1]])) {
      for (int j = r[o[i - 1]]; j < r[o[i]]; j++) {
        s[j] = '0';
      }
      s[r[o[i]]] = '\0';
    } else {
      printf("NO\n");
      return;
    }
  }
  for (int i = 0; i < r[o[0]]; i++) {
    s[i] = '0';
  }
  s[r[o[0]]] = '\0';
  strcpy(out[o[0]], s);
  for (int i = 1; i < n; i++) {
    add(r[o[i - 1]]);
    for (int j = r[o[i - 1]]; j < r[o[i]]; j++) {
      s[j] = '0';
    }
    s[r[o[i]]] = '\0';
    strcpy(out[o[i]], s);
  }
  printf("YES\n");
  for (int i = 0; i < n; i++) {
    printf("%s\n", out[i]);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &r[i]);
    o[i] = i;
  }
  sort(o, o + n, f1);
  solve();
  return 0;
}
