#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> L(N);
  for (int i = 0; i < N; ++i) cin >> L[i];
  map<int, vector<int> > m;
  for (int i = 0; i < N; ++i) m[L[i]].push_back(i);
  bool errrr = false;
  string cur;
  vector<string> answer(N);
  for (map<int, vector<int> >::iterator it = m.begin(); it != m.end(); ++it) {
    int ll = it->first;
    vector<int>& ii = it->second;
    cur.resize(ll, '0');
    for (int k = 0; k < ii.size(); ++k) {
      if (errrr) {
        cout << "NO" << endl;
        return 0;
      }
      answer[ii[k]] = cur;
      for (int j = cur.size() - 1;; --j) {
        if (cur[j] == '0') {
          cur[j] = '1';
          break;
        }
        if (j == 0) {
          errrr = true;
          break;
        }
        cur[j] = '0';
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < N; ++i) cout << answer[i] << endl;
}
