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.util.Scanner;
import java.io.*;
import javax.lang.model.util.ElementScanner6; 
import static java.lang.System.out;
import java.util.Stack;
import java.util.Queue;
import java.util.LinkedList;

public class A803
{

   
    
    public static void main(String args[])
    {  

        FastReader in=new FastReader();
        PrintWriter pr = new PrintWriter(new BufferedWriter(new   OutputStreamWriter(System.out)));
        int tc=1;
     
        //tc=in.nextInt();
        while(tc-->0)
        {
            
        	int n=in.nextInt();
        	int k=in.nextInt();
        	
        	int arr[][]=new int[n][n];
        	for(int i=0;i<n;i++)
        	{
				Arrays.fill(arr[i],0);
			}
        	
        	if(k>n*n)
        	{
				pr.println(-1);
				continue;
			}
			
			
			
			outer: for(int i=0;i<n;i++)
			{
				for(int j=0;j<n;j++)
				{
					if(k<2)break outer;
					if(arr[i][j]==1)continue;
					if(i!=j)
					{
						arr[i][j]=1;
						arr[j][i]=1;
						k-=2;
					}
					else
					{
						arr[i][i]=1;
						k--;
					}
					
					
					
				}
			}
			if(k==1)
			{
				for(int i=0;i<n;i++)
				{
					if(arr[i][i]!=1)
					{
						arr[i][i]=1;
						break;
					}
				}
			}
			int c=0;
			
			for(int i=0;i<n;i++)
			{
				for(int j=0;j<n;j++)
				{
					pr.print(arr[i][j]+" ");
					if(arr[i][j]==1)c++;
				}
				pr.println();
			}
			
		//	pr.println(c);
			
			
        	

			



        }
        pr.flush();
    }


    

    static void sort(long[] a) {
		ArrayList<Long> l = new ArrayList<>();
		for (long i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	}
    
    
	static void sort(int[] a) {
		ArrayList<Integer> l = new ArrayList<>();
		for (int i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
    }

    
    static class FastReader
    { 
        BufferedReader br; 
        StringTokenizer st; 

        public FastReader() 
        { 
            br = new BufferedReader(new InputStreamReader(System.in)); 
        } 

        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 

        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 

        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 

        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
        
        int[] readIntArray(int n)
        {
		int a[]=new int[n];
		for(int i=0;i<n;i++)a[i]=nextInt();
		return a;
	}
		
	long[] readLongArray(int n)
	{
		long a[]=new long[n];
		for(int i=0;i<n;i++)a[i]=nextLong();
		return a;
	}
	
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
}