#include <bits/stdc++.h>
using namespace std;
inline long long gcd(long long x, long long y) { return x ? gcd(y % x, x) : y; }
const long long mod = 1e9 + 7;
inline signed rd() {
  signed ans = 0;
  char last = ' ', ch = getchar();
  while (!(ch >= '0' && ch <= '9')) last = ch, ch = getchar();
  while (ch >= '0' && ch <= '9') ans = ans * 10 + ch - '0', ch = getchar();
  if (last == '-') ans = -ans;
  return ans;
}
inline long long QPow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
inline long long QPow(long long a, long long b, const long long &mod) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
long long exgcd(long long a, long long b, long long &x, long long &y) {
  long long d = a;
  if (b == 0)
    x = 1, y = 0;
  else {
    d = exgcd(b, a % b, y, x), y -= a / b * x;
  }
  return d;
}
const long double PI = 3.141592653589793115997963468544185161590576171875;
const long long maxn = 1000005;
pair<signed, signed> p[maxn / 100];
string ans[maxn / 100];
signed tree[maxn][3];
bool flag[maxn];
long long tot = 0;
bool insert(long long n, long long cur) {
  long long len = n;
  signed root = 0;
  vector<signed> stk;
  string Ans;
  for (long long i = 0; i < len; i++) {
    stk.push_back(root);
    long long id = 0;
    if (flag[tree[root][id]]) id = 1 - id;
    if (flag[tree[root][id]] == 0) {
      if (tree[root][id] == 0) tree[root][id] = ++tot;
      root = tree[root][id];
    } else
      return 0;
    Ans.push_back('0' + id);
  }
  flag[root] = 1;
  ans[cur] = Ans;
  while (stk.size())
    flag[stk.back()] = tree[stk.back()][0] && tree[stk.back()][1] &&
                       flag[tree[stk.back()][0]] && flag[tree[stk.back()][1]],
    stk.pop_back();
  return 1;
}
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long t, m, n, R;
  long long k;
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> p[i].first, p[i].second = i;
  sort(p + 1, p + 1 + n);
  bool flag = 1;
  for (long long i = 1; i <= n; i++) flag &= insert(p[i].first, p[i].second);
  if (flag) {
    cout << "YES\n";
    for (long long i = 1; i <= n; i++) cout << ans[i] << '\n';
  } else
    cout << "NO\n";
  return 0;
}
