//============================================================================
// Name        : [email protected]	C. Old Berland Language
// Author      : LiJunLe
// Version     : Accepted	DFS or Constructure
// Copyright   : Your copyright notice
// Description : http://www.codeforces.com/contest/37/problem/C
//============================================================================

#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <string>
#include <string.h>
#define M 1005
using namespace std;
int data[M];
int visited[M];
int mymax;
char out[M];
bool finish;

struct Node {
	int index;
	string out;
} node[M];

int n;

void testFinish() {
	for (int i = 0; i < n; i ++) {
		if (visited[i] == false) {
			finish = false;
			return;
		}
	}
	finish = true;
}

bool hasDepth(int depth) {
	for (int i = 0; i < n; i ++) {
		if (data[i] == depth && visited[i] == false) {
			visited[i] = true;
			out[depth] = 0;
			node[i].out = string(out);
			testFinish();
			return true;
		}
	}
	return false;
}

void DFS(int depth) {
	if (hasDepth(depth)) {
		return;
	}
	else if (depth > mymax) {
		return;
	}
	else {
		out[depth] = '0';
		DFS(depth + 1);
		if (finish) {
			return;
		}
		out[depth] = '1';
		DFS(depth + 1);
	}
}

// DFS the Huffman Tree, the data of this problem is small
int _main() {
	freopen("test.in", "r", stdin);
	freopen("test.out", "w", stdout);

	while(scanf("%d", &n) != EOF ) {
		mymax = -1;
		memset(out, 0, sizeof(out));
		memset(visited, 0, sizeof (visited));
		for (int i = 0; i < n; i ++) {
			scanf("%d", &data[i]);
			if (data[i] > mymax) {
				mymax = data[i];
			}
		}
		finish = false;
		DFS(0);
		if (finish) {
			puts("YES");
			for (int i = 0; i < n; i ++) {
				cout << node[i].out << endl;
			}
		}
		else {
			puts("NO");
		}
	}
	return 0;
}

int _main() { // make the worst test data
	freopen("test.in", "w", stdout);
	cout << "1000" << endl;
	for (int i = 0; i < 1000; i ++) {
		cout << "1000 ";
	}
	cout << endl;
	return 0;
}