#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7FFFFFFF;
const long long INFL = 0x7FFFFFFFFFFFFFFFLL;
template <class T>
bool get_max(T& a, const T& b) {
  return b > a ? a = b, 1 : 0;
}
template <class T>
bool get_min(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
int show[1100];
vector<int> cnt[1100];
string ans[1100];
bool add(int pos) {
  show[pos]++;
  int j = show[pos] / 2, i = pos;
  show[pos] %= 2;
  while (j != 0) {
    i--;
    if (i < 0) return false;
    show[i]++;
    j = show[i] / 2;
    show[i] %= 2;
  }
  return true;
}
int main() {
  int n, max = 0;
  scanf("%d", &n);
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < n; ++i) {
    int tmp;
    scanf("%d", &tmp);
    get_max(max, tmp);
    cnt[tmp].push_back(i);
  }
  int sum = n;
  for (int i = 1; i <= max; ++i) {
    for (int j = 0; j < ((int)(cnt[i].size())); ++j) {
      --sum;
      if (!add(i - 1) && sum != 0) {
        printf("NO\n");
        return 0;
      }
    }
  }
  memset(show, 0, sizeof(show));
  printf("YES\n");
  for (int i = 1; i <= max; ++i) {
    for (int j = 0; j < ((int)(cnt[i].size())); ++j) {
      for (int k = 0; k < i; ++k) {
        ans[cnt[i][j]] += show[k] ? "1" : "0";
      }
      add(i - 1);
    }
  }
  for (int i = 0; i < n; ++i) {
    cout << ans[i] << endl;
  }
  return 0;
}
