#include <bits/stdc++.h>
using namespace std;
struct Counter {
  static int k;
  Counter() { k++; }
  ~Counter() { k--; }
};
int Counter::k = 0;
template <typename T>
void pr(const string& name, T t) {
  cout << name << " = " << t << endl;
}
template <typename T, typename... Types>
void pr(const string& names, T t, Types... rest) {
  auto comma_pos = names.find(',');
  cout << names.substr(0, comma_pos) << " = " << t << ", ";
  auto next_name_pos = names.find_first_not_of(" \t\n", comma_pos + 1);
  pr(string(names, next_name_pos), rest...);
}
void mod(long long& a, long long b) {
  a %= b;
  if (a < 0) a += b;
}
const long long MOD = 1000000007;
bool End[1000005];
int N;
int Back, Next[1000005][2];
pair<int, int> A[1005];
string Ans[1005];
string S;
void create(int i, int j) {
  Next[i][j] = ++Back;
  Next[Back][0] = Next[Back][1] = -1;
}
bool dfs(int n, int l, int goal, int free) {
  if (End[n]) return false;
  if (l == goal) {
    End[n] = true;
    return free;
  }
  if (Next[n][0] < 0) {
    create(n, 0);
    S[l + 1] = '0';
    return dfs(Next[n][0], l + 1, goal, 1);
  }
  if (Next[n][1] < 0) {
    create(n, 1);
    S[l + 1] = '1';
    return dfs(Next[n][1], l + 1, goal, 1);
  }
  for (int i = (0); i <= (1); i++) {
    S[l + 1] = i + '0';
    if (dfs(Next[n][i], l + 1, goal, free)) return true;
  }
  return false;
}
int main() {
  cin >> N;
  for (int i = (1); i <= (1000); i++) S += '0';
  vector<string> v;
  Next[0][0] = Next[0][1] = -1;
  for (int i = (1); i <= (N); i++) {
    cin >> A[i].first;
    A[i].second = i;
  }
  sort(A + 1, A + N + 1);
  for (int i = (1); i <= (N); i++) {
    int l = A[i].first;
    if (!dfs(0, -1, l - 1, 0)) {
      cout << "NO";
      return 0;
    }
    Ans[A[i].second] = S.substr(0, l);
  }
  cout << "YES\n";
  for (int i = (1); i <= (N); i++) cout << Ans[i] << "\n";
}
