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.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;

import java.util.StringTokenizer;

 public class Test
 {
     static PrintWriter pw = new PrintWriter(System.out);
  
     
    public static void main(String[] args)throws Exception
    {
        Reader.init(System.in);
        int n = Reader.nextInt();
        int k = Reader.nextInt();
        
        if(k > n * n )
        {
            pw.print(-1);
            pw.close();
            return;
        }
        
       
            int[][] ar = new int[n][n];
            for(int i = 0 ; i<n ; i++)
                for(int j = 0 ; j<n ; j++)
                {
                    if(ar[i][j] == 1)continue;
                    
                    if(i == j && k > 0)
                    {
                       ar[i][j] = 1;
                       k--;
                    }
                    else if(k > 1)
                    {
                        ar[i][j] = 1;
                        ar[j][i] = 1;
                        k -= 2;
                    }
                    
                    
                }
            
            if(k > 0)
            {
                pw.print(-1);
                pw.close();
                return;
            }
            
            String s = "";
            for(int i = 0 ; i<n ; i++)
            {
                for(int j = 0 ; j<n ; j++)
                    s += ar[i][j] + " ";
                s += "\n";
            }
            
            pw.print(s);
            pw.close();
        }
        
    
        
}

class Reader {

    static BufferedReader reader;
    static StringTokenizer tokenizer;

    public static int pars(String x) {
        int num = 0;
        int i = 0;
        if (x.charAt(0) == '-') {
            i = 1;
        }
        for (; i < x.length(); i++) {
            num = num * 10 + (x.charAt(i) - '0');
        }

        if (x.charAt(0) == '-') {
            return -num;
        }

        return num;
    }

    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input));
        tokenizer = new StringTokenizer("");
    }

    static void init(FileReader input) {
        reader = new BufferedReader(input);
        tokenizer = new StringTokenizer("");
    }

    static String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(
                    reader.readLine());
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return pars(next());
    }

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

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
}