#include <bits/stdc++.h>
using namespace std;
pair<int, int> p[1005];
string ans[1005];
bool flag;
int ind;
struct node {
  bool end, wayOut;
  node *next[2];
};
node *getNode() {
  node *Node = (node *)malloc(sizeof(node));
  if (Node == NULL) {
    printf("Error :(\n");
  } else {
    Node->end = false;
    Node->wayOut = true;
    Node->next[0] = Node->next[1] = NULL;
  }
  return Node;
}
void insert(node *root, int l) {
  if (l == 0) {
    root->wayOut = false;
    return;
  }
  if (root->next[0] == NULL) {
    root->next[0] = getNode();
    ans[ind].push_back('0');
    insert(root->next[0], l - 1);
  } else if (root->next[0]->wayOut == true) {
    ans[ind].push_back('0');
    insert(root->next[0], l - 1);
  } else if (root->next[1] == NULL) {
    root->next[1] = getNode();
    ans[ind].push_back('1');
    insert(root->next[1], l - 1);
  } else if (root->next[1]->wayOut == true) {
    ans[ind].push_back('1');
    insert(root->next[1], l - 1);
  } else {
    flag = false;
  }
  root->wayOut = (root->next[0] == NULL || root->next[1] == NULL ||
                  root->next[0]->wayOut || root->next[1]->wayOut)
                     ? true
                     : false;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &p[i].first);
    p[i].second = i;
  }
  sort(p, p + n);
  node *root = (node *)malloc(sizeof(node));
  for (int i = 0; i < n; i++) {
    flag = true;
    ind = p[i].second;
    insert(root, p[i].first);
    if (!flag) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  for (int i = 0; i < n; i++) cout << ans[i] << "\n";
  return 0;
}
