#include <bits/stdc++.h>
using namespace std;
int const N = 5e5 + 10, oo = 1e9;
int mod = oo + 7;
long long const OO = 1e18;
pair<int, int> aa[1001];
string an[1001];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> aa[i].first, aa[i].second = i;
  sort(aa, aa + n);
  for (int i = 0; i < aa[n - 1].first; i++) an[aa[n - 1].second] += '0';
  for (int i = n - 2; i > -1; i--) {
    string now;
    for (int j = 0; j < aa[i].first; j++) now += an[aa[i + 1].second][j];
    int k = now.size() - 1;
    while (k > -1 && now[k] == '1') {
      now[k] = '0';
      k--;
    }
    if (k == -1) {
      cout << "NO\n";
      return 0;
    }
    now[k] = '1';
    an[aa[i].second] = now;
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) cout << an[i] << endl;
  return 0;
}
