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.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import javafx.scene.layout.GridPane;

/**
 *
 * @author ehab
 */
public class JavaApplication1 {
   

    public static void main(String[] args) throws Exception
    { Reader.init(System.in);
      int n = Reader.nextInt() , k = Reader.nextInt() ;
      int ar[][] = new int [n][n] ;
      StringBuilder ans = new StringBuilder() ;
      for(int i = 0 ; i < n ; i++)
      { for(int j = 0 ; j < n ; j++)
          { if(i == j && k - 1 >= 0)
              { ar[i][j] = 1 ;
                k--;
              }   
              else 
                  if(ar[i][j] == 0 && k - 2 >= 0)
                  {
                   ar[i][j] = 1 ;
                   ar[j][i] = 1 ;
                   k -= 2;
                  
                  }
          ans.append(ar[i][j]+" ") ;
          }
    ans.append("\n") ;
    }
      if(k > 0){ System.out.println("-1");}
      else 
      {
          System.out.print(ans);
      
      }
     
      
       
       
     
       
       
       }
  
         
    
        
        
        
        
        
}
    


 class pair implements Comparable<pair>
    {
     int  a , b; 
    int p;
     int ind ;
     int d ;
     
    pair(int a , int b)
    {
    this.a = a ;
    this.b = b ;
    
    
   
  
    }
  
    public int compareTo(pair t) {
        
     return 1 ;
    }
    
    
    
    }


class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(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 Integer.parseInt( next() );
    }
	 static int nextShort() throws IOException {
        return Short.parseShort(next() );
    }
    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
    static long nextLong() throws IOException{
    return Long.parseLong(next()) ;
    }
}