#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
const long long inf = 1e18;
int n, cur;
pair<int, int> a[maxn];
string words[maxn];
void dfs(string &s, int depth) {
  if (cur == n) return;
  if (a[cur].first == depth) {
    words[a[cur++].second] = s;
    return;
  }
  s.push_back('0');
  dfs(s, depth + 1);
  s.back() = '1';
  dfs(s, depth + 1);
  s.pop_back();
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a[i] = {x, i};
  }
  sort(a, a + n);
  string emp = "";
  dfs(emp, 0);
  if (cur < n) {
    puts("NO");
  } else {
    puts("YES");
    for (int i = 0; i < n; i++) {
      puts(words[i].data());
    }
  }
  return 0;
}
