#include <bits/stdc++.h>
using namespace std;
const long long int M = 1e9 + 7;
using namespace std;
long long int fpow(long long int a, long long int b) {
  b %= (M - 1);
  a %= M;
  long long int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = res * a % M;
    }
    a = a * a % M;
    b >>= 1;
  }
  return res;
}
long long int t[12 * 100000] = {0};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<pair<int, int>> le(n);
  for (int i = 0; i < n; i++) {
    int u;
    cin >> u;
    le[i] = {u, i};
  }
  sort((le).begin(), (le).end());
  map<int, string> ans;
  int last = 0;
  string init = "";
  bool bc = 1;
  for (int i = 0; i < n; i++) {
    if (last == 0) {
      for (int j = 0; j < le[i].first; j++) {
        init += '0';
      }
      ans.insert({le[i].second, init});
      last = le[i].first;
    } else {
      bc = 0;
      for (int bits = last - 1; bits >= 0; bits--) {
        if (init[bits] == '0') {
          bc = 1;
          init[bits] = '1';
          break;
        } else {
          init[bits] = '0';
        }
      }
      if (!bc) {
        cout << "NO" << endl;
        break;
      } else {
        for (int j = 0; j < le[i].first - last; j++) {
          init += '0';
        }
        ans.insert({le[i].second, init});
        last = le[i].first;
      }
    }
  }
  if (bc) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      cout << ans[i] << endl;
    }
  }
  return 0;
}
