#include <bits/stdc++.h>
using namespace std;
int n, data[1000], orig[1000];
vector<pair<int, int> > ans[1000], stat;
bool up(int ind);
bool isUsed[1000];
void print(int ind);
bool increase(int &curVal, int i);
int lastlen;
int main(void) {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> orig[i];
    data[i] = orig[i];
  }
  sort(data, data + n);
  bool isAble = true;
  for (int i = 0; i < n; i++) {
    int j = i;
    while (j < n && data[i] == data[j]) j++;
    int cnt = j - i;
    int curVal = -1;
    for (int j = 0; j < cnt; j++) {
      isAble = increase(curVal, i);
      if (!isAble) break;
      ans[i + j] = stat;
      ans[i + j].push_back(make_pair(data[i] - lastlen, curVal));
    }
    if (!isAble) break;
    i += cnt - 1;
    if (i < n - 1) {
      isAble = increase(curVal, i);
      stat.push_back(make_pair(data[i] - lastlen, curVal));
      if (!isAble) break;
    }
    lastlen = data[i];
  }
  if (!isAble)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (orig[i] == data[j] && !isUsed[j]) {
          isUsed[j] = true;
          print(j);
          break;
        }
      }
    }
  }
  return 0;
}
void print(int ind) {
  for (int i = 0; i < ans[ind].size(); i++) {
    int len = ans[ind][i].first;
    int val = ans[ind][i].second;
    for (int j = len - 1; j >= 20; j--) printf("0");
    for (int j = min(len - 1, 19); j >= 0; j--)
      printf("%d", (val & (1 << j)) ? 1 : 0);
  }
  printf("\n");
}
bool increase(int &curVal, int i) {
  curVal++;
  int len = data[i] - lastlen;
  if (len < 20 && curVal == (1 << len)) {
    curVal = 0;
    if (up((int)stat.size() - 1) == false) return false;
  }
  return true;
}
bool up(int ind) {
  if (ind == -1) {
    return false;
  }
  stat[ind].second++;
  if (stat[ind].second == (1 << stat[ind].first)) {
    stat[ind].second = 0;
    return up(ind - 1);
  }
  return true;
}
