990_D. Graph And Its Complement_8887
Given three numbers n, a, b. You need to find an adjacency matrix of such an undirected graph that the number of components in it is equal to a, and the number of components in its complement is b. The matrix must be symmetric, and all digits on the main diagonal must be zeroes.

In an undirected graph loops (edges from a vertex to itself) are not allowed. It can be at most one edge between a pair of vertices.

The adjacency matrix of an undirected graph is a square matrix of size n consisting only of "0" and "1", where n is the number of vertices of the graph and the i-th row and the i-th column correspond to the i-th vertex of the graph. The cell (i,j) of the adjacency matrix contains 1 if and only if the i-th and j-th vertices in the graph are connected by an edge.

A connected component is a set of vertices X such that for every two vertices from this set there exists at least one path in the graph connecting this pair of vertices, but adding any other vertex to X violates this rule.

The complement or inverse of a graph G is a graph H on the same vertices such that two distinct vertices of H are adjacent if and only if they are not adjacent in G.

Input

In a single line, three numbers are given n, a, b  (1 ≤ n ≤ 1000, 1 ≤ a, b ≤ n): is the number of vertexes of the graph, the required number of connectivity components in it, and the required amount of the connectivity component in it's complement. 

Output

If there is no graph that satisfies these constraints on a single line, print "NO" (without quotes).

Otherwise, on the first line, print "YES"(without quotes). In each of the next n lines, output n digits such that j-th digit of i-th line must be 1 if and only if there is an edge between vertices i and j in G (and 0 otherwise). Note that the matrix must be symmetric, and all digits on the main diagonal must be zeroes. 

If there are several matrices that satisfy the conditions — output any of them.

Examples

Input

3 1 2


Output

YES
001
001
110


Input

3 3 3


Output

NO
def generate_matrix(h):
    result = [[0 for x in range(h)] for y in range(h)]
    return result
 
def generate_m_component_matrix(h, comp):
    result = generate_matrix(h)
    for i in range(0, h - comp + 1):
        for j in range(0, h - comp + 1):
            result[i][j] = 0 if i == j else 1
    return result
 
def invert_matrix(h, result):
    for i in range(0, h):
        for j in range(0, h):
            result[i][j] = 1 if result[i][j] == 0 and i != j else 0
    return result
 
def generate_one_component_graph(h):
    result = generate_matrix(h)
    for i in range(1, h):
        result[i][i - 1] = result[i - 1][i] = 1
    return result
 
def print_matrix(h, matrix):
    for i in range(0, h):
        s = ''.join(str(e) for e in matrix[i])
        print(s)
    
    
h, a, b = map(int, input().split())
if a > 1 and b > 1:
    print('NO')
elif a > 1:
    # generate matrix
    matrix = generate_m_component_matrix(h, a)
    print('YES')
    print_matrix(h, matrix)
elif b > 1:
    # generate matrix and invert it
    matrix = generate_m_component_matrix(h, b)
    matrix = invert_matrix(h, matrix)
    print('YES')
    print_matrix(h, matrix)
else:
    if h > 3 or h == 1:
        # generate matrix with broken loop
        matrix = generate_one_component_graph(h)
        print('YES')
        print_matrix(h, matrix)
    else:
        print('NO')
			 			    	    	  		 		 						