Problem: 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

Solution (in JAVA):

Solution:
import java.util.*;
import java.io.*;

//110
//110
//000

public class B{
	public static void main(String[] args)
	{
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = fs.nextInt(); int k = fs.nextInt();
		
		if(k>n*n)
		{
			out.println("-1");
		}
		else
		{
			int[][] arr = new int[n][n];
			me:for(int i=0;i<n;i++)
			{
				for(int j=0;j<n;j++)
				{
					if(k <= 0)break me;
					if(arr[i][j] == 1)continue;
					
					int cells = 2;
					if(i == j)cells = 1;
					if(cells>k)continue;
					
					k -= cells;
					arr[i][j] = arr[j][i] = 1;
					
				}
			}
			if(k != 0)
			{
				out.println("-1");
			}
			else
			{
				for(int i=0;i<n;i++)
				{
					for(int j=0;j<n;j++)
					{
						out.print(arr[i][j]+" ");
					}
					out.println();
				}
			}
				
		}
		
		out.close();
	}
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
	public static int[] sort(int[] arr)
	{
		List<Integer> temp = new ArrayList();
		for(int i:arr)temp.add(i);
		Collections.sort(temp);
		int start = 0;
		for(int i:temp)arr[start++]=i;
		return arr;
	}
	public static String rev(String str)
	{
		char[] arr = str.toCharArray();
		char[] ret = new char[arr.length];
		int start = arr.length-1;
		for(char i:arr)ret[start--] = i;
		String ret1 = "";
		for(char ch:ret)ret1+=ch;
		return ret1;
	}
}