#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int mod = 1e9 + 7;
const int inf = 1061109567;
const int dir[][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
pair<int, int> a[1005];
int n, cur;
string ans[1005];
void dfs(string s, int len) {
  if (cur == n) return;
  if (len == a[cur].first) {
    ans[a[cur++].second] = s;
    return;
  }
  s += '0';
  dfs(s, len + 1);
  s[s.size() - 1] = '1';
  dfs(s, len + 1);
}
int main() {
  cin >> n;
  int x;
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    a[i] = make_pair(x, i);
  }
  string s = "";
  sort(a, a + n);
  dfs(s, 0);
  if (cur == n) {
    puts("YES");
    for (int i = 0; i < n; i++) {
      cout << ans[i] << endl;
    }
  } else {
    puts("NO");
  }
  return 0;
}
