#include <bits/stdc++.h>
using namespace std;
string lower(string s) {
  for (int i = 0; i < s.size(); i++) s[i] = tolower(s[i]);
  return s;
}
vector<string> sep(string s, char c) {
  string temp;
  vector<string> res;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == c) {
      if (temp != "") res.push_back(temp);
      temp = "";
      continue;
    }
    temp = temp + s[i];
  }
  if (temp != "") res.push_back(temp);
  return res;
}
template <class T>
T toint(string s) {
  stringstream ss(s);
  T ret;
  ss >> ret;
  return ret;
}
template <class T>
string tostr(T inp) {
  string ret;
  stringstream ss;
  ss << inp;
  ss >> ret;
  return ret;
}
template <class T>
void D(T A[], int n) {
  for (int i = 0; i < n; i++) cout << A[i] << " ";
  cout << endl;
}
template <class T>
void D(vector<T> A, int n = -1) {
  if (n == -1) n = A.size();
  for (int i = 0; i < n; i++) cout << A[i] << " ";
  cout << endl;
}
int a[1001];
int ind[1001];
struct node {
  node *left, *right;
  bool end;
  bool full;
  node() {
    left = NULL;
    right = NULL;
    end = false;
    full = false;
  }
};
int temp[1001];
string ans[1001];
node *insert(node *cn, int len, bool &suc) {
  if (cn == NULL) {
    cn = new node();
  }
  if (len == 0) {
    cn->end = true;
    cn->full = true;
    suc = true;
    return cn;
  }
  if (cn->left == NULL || cn->left->full == false) {
    temp[len] = 0;
    cn->left = insert(cn->left, len - 1, suc);
  } else if (cn->right == NULL || cn->right->full == false) {
    temp[len] = 1;
    cn->right = insert(cn->right, len - 1, suc);
  } else {
    suc = false;
    return NULL;
  }
  if (!suc) return NULL;
  if (cn->left != NULL && cn->right != NULL && cn->left->full &&
      cn->right->full)
    cn->full = true;
  return cn;
}
bool cmp(const int &i1, const int &i2) { return a[i1] < a[i2]; }
int main() {
  int n;
  scanf("%d", &n);
  for (int(i) = (0); (i) < (n); (i)++) {
    scanf("%d", &a[i]);
    ind[i] = i;
  }
  sort(ind, ind + n, cmp);
  node *root = NULL;
  bool val = 1;
  for (int(i) = (0); (i) < (n); (i)++) {
    root = insert(root, a[ind[i]], val);
    if (!val) break;
    ans[ind[i]] = "";
    for (int j = a[ind[i]]; j > 0; j--)
      if (temp[j])
        ans[ind[i]] += "1";
      else
        ans[ind[i]] += "0";
  }
  if (!val)
    puts("NO");
  else {
    puts("YES");
    for (int(i) = (0); (i) < (n); (i)++) puts(ans[i].c_str());
  }
  return 0;
}
