#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
inline string get() {
  char ch[2000010];
  scanf("%s", ch);
  return ch;
}
const int MAX_LG = 21;
const long long maxn = 1e5 + 10;
const long long maxm = 1e5 + 10;
const long long base = 29;
const long long mod = 1e9 + 7;
const long long INF = 1e9 + 100;
const long long SQ = 317;
pair<long long, long long> a[maxn];
long long n;
string res[maxn];
deque<string> q;
long long cnt[maxn];
long long rem = n;
long long cur = 0;
inline void solve(long long pt) {
  if (pt > a[n - 1].first) return;
  while (cnt[pt]--) {
    if (!q.size()) {
      cout << "NO\n";
      exit(0);
    }
    res[a[cur++].second] = q.back();
    q.pop_back();
    rem--;
  }
  long long now = q.size();
  long long cc = now;
  while (cc && q.size() - now < rem) {
    q.push_back(q.front() + '0');
    q.push_back(q.front() + '1');
    q.pop_front();
    cc--;
  }
  while (cc) {
    q.pop_front();
    cc--;
  }
  solve(pt + 1);
}
int32_t main() {
  n = in();
  rem = n;
  for (long long i = 0; i < n; i++) a[i] = {in(), i}, cnt[a[i].first]++;
  sort(a, a + n);
  q.push_back("1");
  q.push_back("0");
  solve(1);
  cout << "YES\n";
  for (long long i = 0; i < n; i++) cout << res[i] << "\n";
}
