You are given matrix with n rows and n columns filled with zeroes. You should put k ones in it in such a way that the resulting matrix is symmetrical with respect to the main diagonal (the diagonal that goes from the top left to the bottom right corner) and is lexicographically maximal.

One matrix is lexicographically greater than the other if the first different number in the first different row from the top in the first matrix is greater than the corresponding number in the second one.

If there exists no such matrix then output -1.

Input

The first line consists of two numbers n and k (1 ≤ n ≤ 100, 0 ≤ k ≤ 106).

Output

If the answer exists then output resulting matrix. Otherwise output -1.

Examples

Input

2 1


Output

1 0 
0 0 


Input

3 2


Output

1 0 0 
0 1 0 
0 0 0 


Input

2 5


Output

-1

import sys

'''
Given n x n matrix of 0's
insert k 1's s.t. the matrix is symmetrical along the diagonal (top left to bot right)
and is "lexicographically maximal"

lexicographically greater -> if the first diff # in the first diff row from the
top in the first matrix is greater than the corresponding # in the second one

1 <= n <= 100; 0 <= k <= 10^6

input:
n, k // first line
output:
resulting matrix
-1 if o/w impossible
'''

'''
Properties:
    n cells on the diagonal (use for odd #'s)
    at most n * n / 2 nodes

'''
def printAllZero(n):
    for i in range(n):
        print('0 ' * n)

def printMatrix(onesInColRow):
    n = len(onesInColRow)
    for row in range(n):
        line = ''
        # fill w/ prev colRows
        for col in range(row):
            if onesInColRow[col] > 0:
                line += '1 '
                onesInColRow[col] -= 1
            else:
                line += '0 '
        
        # fill w/ remaining from curr row
        onesInCurrRow = 0
        if onesInColRow[row] >= 1:
            onesInCurrRow += 1
            onesInColRow[row] -= 1
        half = onesInColRow[row] // 2
        onesInCurrRow += half
        onesInColRow[row] -= half
        line += '1 ' * onesInCurrRow
        
        zeroesInCurrRow = n - (row + onesInCurrRow) # row = # cells from prev, onesInCurrRow, sub from total len of line (n)
        line += '0 ' * zeroesInCurrRow

        print(line)



if __name__ == "__main__":
    n, k = [int(i) for i in input().split(" ")]
    if k < 0 or k > n*n: # invalid # of 1's
        print(-1)
        sys.exit()
        
    #if k == 0:
    #    printAllZero(n)
    
    # compute and print matrix
    onesInColRow = [0] * n # each index stores # of 1's in the row (also meaning corresponding ith column)
    # overall a row + col stores (n - i) * 2 - 1 cells at most
    for row in range(n):
        if k == 0: # no more to process so done
            break
        #print("Row:" + str(row))
        rowLen = n - row
        maxOnes = rowLen * 2 - 1
        #print("maxOnes: {}".format(maxOnes))
        if k >= maxOnes: # if can fill top+left side w/ 1's
            onesInColRow[row] = maxOnes
            k -= maxOnes
            #print("1\'s used ALL: {}".format(row))
        else: # if k can't fully fit both the top+left side w/ 1's
            # find how many it can do while being maximal
            maxOnesAvailableForRow = k # if odd just fill all w/ 1's and done (I think)
            if k % 2 == 0: # even then chop 1 for next row
                maxOnesAvailableForRow = k - 1
            onesInColRow[row] = maxOnesAvailableForRow
            k -= maxOnesAvailableForRow
            #print("1\'s used SOME: {}".format(maxOnesAvailableForRow))
    printMatrix(onesInColRow)
