#include <bits/stdc++.h>
using namespace std;
struct _ {
  _() { ios_base::sync_with_stdio(0); }
} _;
template <class T>
void PV(T a, T b) {
  while (a != b) cout << *a++, cout << (a != b ? " " : "\n");
}
template <class T>
inline bool chmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
inline bool chmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
const int inf = 0x3f3f3f3f;
const int mod = int(1e9) + 7;
const int N = 111111;
int n;
int d[N];
vector<pair<int, int> > vp;
vector<string> pool;
vector<pair<int, string> > res;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> d[i];
  for (int i = 0; i < n; i++) vp.push_back(make_pair(d[i], i));
  sort((vp).begin(), (vp).end());
  pool.push_back("0");
  pool.push_back("1");
  int no = 0;
  for (int i = 0; i < n; i++) {
    int first = vp[i].first;
    int ok = 0;
    while (!pool.empty() && pool[0].size() < first) {
      if (pool.size() >= n)
        for (auto j : pool) j += '0';
      vector<string> B;
      for (auto j : pool) {
        B.push_back(j + '0');
        B.push_back(j + '1');
        if (B.size() >= n) break;
      }
      if (B.size() > n) B.resize(n);
      swap(pool, B);
      ok = 1;
    }
    if (pool.empty()) {
      no = 1;
      break;
    }
    res.push_back(make_pair(vp[i].second, pool.back()));
    pool.pop_back();
  }
  if (no)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    sort((res).begin(), (res).end());
    for (auto i : res) cout << i.second << endl;
  }
  return 0;
}
