#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const int maxn = 3e3 + 50;
const int Mod = 1000000007;
const double PI = acos(-1);
using namespace std;
struct Ans {
  int id, x;
  string ret;
};
Ans ans[maxn];
string v[maxn];
int cnt;
bool full;
int n;
inline bool cmpById(const Ans &a, const Ans &b) { return a.id < b.id; }
inline bool cmpByX(const Ans &a, const Ans &b) { return a.x < b.x; }
bool cmpByLen(const string &a, const string &b) { return a.size() > b.size(); }
void expend(int dem, int len) {
  if (full) return;
  while (1) {
    int sz = cnt;
    for (int i = sz - 1; i >= 0; i--) {
      v[cnt++] = v[i] + "0";
      v[i] = v[i] + "1";
    }
    if (cnt >= dem) full = true;
    sort(v, v + cnt, cmpByLen);
    if (full || v[cnt - 1].size() == len) return;
  }
}
bool solve() {
  v[cnt++] = "0";
  v[cnt++] = "1";
  for (int i = 0; i < n; i++) {
    int tar = ans[i].x;
    if (cnt == 0) return false;
    if (v[cnt - 1].size() < tar) expend(n - i, tar);
    if (full) {
      v[cnt - 1] = v[cnt - 1] + string(tar - v[cnt - 1].size(), '1');
    }
    ans[i].ret = v[cnt - 1];
    cnt--;
  }
  return true;
}
int main() {
  while (scanf("%d", &n) != EOF) {
    for (int i = 0; i < n; i++) {
      ans[i].id = i;
      scanf("%d", &ans[i].x);
    }
    cnt = 0;
    full = false;
    sort(ans, ans + n, cmpByX);
    if (solve()) {
      puts("YES");
      sort(ans, ans + n, cmpById);
      for (int i = 0; i < n; i++) puts(ans[i].ret.c_str());
    } else
      puts("NO");
  }
  return 0;
}
