#include <bits/stdc++.h>
using namespace std;
struct Ary {
  int len;
  vector<int> idx;
  Ary(int a, int b) : len(a) { idx.push_back(b); }
  Ary(int a, vector<int> b) : len(a), idx(b) {}
  Ary(const Ary& a) : len(a.len), idx(a.idx) {}
};
bool operator<(const Ary& a, const Ary& b) {
  if (a.len == b.len) {
    if (a.idx.size() == b.idx.size()) return a.idx[0] < b.idx[0];
    return a.idx.size() < b.idx.size();
  }
  return a.len > b.len;
}
bool canConst(map<int, int>& cnt) {
  long long n = 1;
  int i = 0;
  for (map<int, int>::iterator p = cnt.begin(); p != cnt.end(); ++p) {
    for (; i < p->first; ++i) {
      n *= 2;
      if (n < 0) n = 0x7ffffffffff;
    }
    if (n < p->second) return false;
    n -= p->second;
  }
  return true;
}
int main(void) {
  int n;
  cin >> n;
  set<Ary> st;
  map<int, int> cnt;
  for (int i = 0; i < n; ++i) {
    int L;
    cin >> L;
    cnt[L]++;
    st.insert(Ary(L, i));
  }
  if (canConst(cnt)) {
    cout << "YES\n";
    vector<string> bit(n);
    while (st.size() > 1) {
      set<Ary>::iterator p;
      Ary a(*(p = st.begin()));
      st.erase(p);
      Ary b(*(p = st.begin()));
      st.erase(p);
      for (; a.len > b.len; --(a.len)) {
        for (int i = 0; i < a.idx.size(); ++i)
          bit[a.idx[i]] = bit[a.idx[i]] + "0";
      }
      for (int i = 0; i < a.idx.size(); ++i) bit[a.idx[i]] += "0";
      for (int i = 0; i < b.idx.size(); ++i) bit[b.idx[i]] += "1";
      vector<int> id(a.idx);
      for (int i = 0; i < b.idx.size(); ++i) id.push_back(b.idx[i]);
      st.insert(Ary(b.len - 1, id));
    }
    int len = st.begin()->len;
    if (len > 0)
      for (int i = 0; i < n; ++i) bit[i] += string(len, '0');
    for (int i = 0; i < n; ++i) {
      reverse(bit[i].begin(), bit[i].end());
      cout << bit[i] << "\n";
    }
  } else {
    cout << "NO\n";
  }
  return 0;
}
