#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long double PI = 4 * atan((long double)1);
long long power(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n % 2) res *= a;
    a *= a;
    n /= 2;
  }
  return res;
}
struct node {
  node* next[2];
  bool isEnd;
};
node* nn() {
  node* newnode = new node();
  newnode->isEnd = false;
  newnode->next[0] = NULL;
  newnode->next[1] = NULL;
  return newnode;
}
bool isFilled(node* root) {
  int cnt = 0;
  if (root->next[0] != NULL && root->next[0]->isEnd == true) cnt++;
  if (root->next[1] != NULL && root->next[1]->isEnd == true) cnt++;
  if (cnt == 2) return true;
  return false;
}
bool mark(node* root) {
  if (root->next[0] != NULL && root->next[0]->isEnd == false)
    root->next[0]->isEnd = mark(root->next[0]);
  if (root->next[1] != NULL && root->next[1]->isEnd == false)
    root->next[1]->isEnd = mark(root->next[1]);
  if (isFilled(root) == true) return true;
  return false;
}
int insert(node* root, int size, int* arr, int dep = 0) {
  if (size == 0) {
    root->isEnd = true;
    return 1;
  }
  if (root->next[0] == NULL) {
    int p = 0;
    while (p != size) {
      node* nu = nn();
      root->next[0] = nu;
      root = root->next[0];
      arr[dep] = 0;
      dep++;
      p++;
    }
    root->isEnd = true;
    return 1;
  } else {
    if (root->isEnd == true) {
      return 0;
    }
    if (root->next[0]->isEnd == true) {
      if (size == 1) root->isEnd = true;
      if (root->next[1] == NULL) {
        node* nu = nn();
        root->next[1] = nu;
        root = root->next[1];
        arr[dep] = 1;
        return insert(root, size - 1, arr, dep + 1);
      } else {
        root = root->next[1];
        arr[dep] = 1;
        return insert(root, size - 1, arr, dep + 1);
      }
    } else {
      root = root->next[0];
      arr[dep] = 0;
      return insert(root, size - 1, arr, dep + 1);
    }
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  long long int a[n];
  vector<pair<int, int> > v;
  for (int i = (0); i < (n); ++i) {
    cin >> a[i];
    v.push_back({a[i], i});
  }
  node* root = nn();
  map<int, string> mpa;
  sort(v.begin(), v.end());
  for (int i = (0); i < (n); ++i) {
    string s;
    int arr[v[i].first];
    int x = insert(root, v[i].first, arr);
    if (x == 0) {
      cout << "NO";
      return 0;
    } else {
      for (int j = (0); j < (v[i].first); ++j) {
        char ui = arr[j] + '0';
        s = s + ui;
      }
      mpa[v[i].second] = s;
    }
    root->isEnd = mark(root);
  }
  cout << "YES\n";
  for (int i = (0); i < (n); ++i) cout << mpa[i] << "\n";
  return 0;
}
