#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
const long long INF64 = 1e18;
const long long MOD = 1e9 + 7;
const long long MOD9 = 1e9 + 9;
const long long MOD3 = 998244353;
const long long P = 37;
const long long mxn = 1000;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng_64(chrono::steady_clock::now().time_since_epoch().count());
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(mxn + 1, 0);
  vector<long long> id(n);
  for (long long i = 0; i < n; ++i) {
    long long l;
    cin >> l;
    id[i] = l;
    a[l]++;
  }
  vector<vector<string> > answ(mxn + 1);
  queue<string> s;
  s.push("0");
  s.push("1");
  for (long long j = 1; j <= mxn; ++j) {
    while (a[j] > 0) {
      if (!s.empty()) {
        answ[j].push_back(s.front());
        s.pop();
      } else {
        cout << "NO";
        return 0;
      }
      --a[j];
    }
    for (long long i = s.size(); i > 0; --i) {
      if (s.size() - i <= mxn) s.push(s.front() + '0');
      if (s.size() - i <= mxn) s.push(s.front() + '1');
      s.pop();
    }
  }
  cout << "YES\n";
  for (long long k = 0; k < n; ++k) {
    cout << answ[id[k]][answ[id[k]].size() - 1] << "\n";
    answ[id[k]].pop_back();
  }
}
