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.*;
import java.util.*;
import java.lang.Math;
import java.math.BigInteger;

public class Problem {

	public static void main(String[] args) throws IOException {

		new Problem().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok;
	static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	Problem() throws FileNotFoundException{

		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in)); 
            out = new PrintWriter(System.out); 
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
		tok = new StringTokenizer("");
	}

	// ======================================================

	int INF = Integer.MAX_VALUE;
	List<Integer>[] graph;
	boolean[] used;
	int[] def;
	void solve() throws IOException {
		int n = rI();
		int k = rI();
		int[][] arr = new int[n][n];
		for(int i=0;i<n;++i){
			for(int j=i;j<n;++j){
				if(k>1&&i!=j){
					arr[i][j]=1;
					arr[j][i]=1;
					k-=2;
				}else if(k>0&&i==j){
					arr[i][j]=1;
					k-=1;
				}
			}
		}
		if(k==0){
			for(int i=0;i<n;++i){
				for(int j=0;j<n;++j){
					out.print(arr[i][j]+" ");
				}
				out.println();
			}
		}else{
			out.println(-1);
		}
		

	}
	
	// ======================================================
	void run() throws IOException {
		solve();
		out.close();
	}


	double sqrt(double m){
		double l = 0;
		double r = 1000000000+9;
		int i=1000;
		while(r-l>6){
			double mid = (r+l)/2;
			if(mid*mid>m){
				r = mid;
			}else{
				l=mid;
			}
			--i;
		}
		return l;
	}
	int countPow(int m,int n){
		int ans = 0;
		while(m%n==0&&m>0){
			ans++;
			m/=n;
		}
		return ans;
	}
	long binPow(long a, long b){
		if(b == 0){
			return 1;
		}
		if(b%2==1){
			return a*binPow(a,b-1);
		}else{
			long c = binPow(a,b/2);
			return c*c;
		}
		
	}
	long gcd(long a, long b){
		return b==0?a:gcd(b,a%b);
	}
	
	long pow(long x, long k){
		long ans=1;
		for(int i=0;i<k;++i){
			ans*=x;
		}
		return ans;
	}
	//////////////////////////////////////////////////////////////////////


	String delimiter = " ";
	String readLine() throws IOException {
		return in.readLine();
	}
	String rS() throws IOException {
		while (!tok.hasMoreTokens()) {
			String nextLine = readLine();
			if (null == nextLine)
				return null;

			tok = new StringTokenizer(nextLine);
		}

		return tok.nextToken(delimiter);
	}
	int rI() throws IOException {
		return Integer.parseInt(rS());
	}

	long rL() throws IOException {
		return Long.parseLong(rS());
	}
	int[] rA(int b) {
		int a[] = new int[b];
		for (int i = 0; i < b; i++) {
			try {
				a[i] = rI();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return a;
	}
	
	int[] readSortedIntArray(int size) throws IOException {
	        Integer[] array = new Integer[size];

	        for (int index = 0; index < size; ++index) {
	            array[index] = rI();
	        }
	        Arrays.sort(array);

	        int[] sortedArray = new int[size];
	        for (int index = 0; index < size; ++index) {
	            sortedArray[index] = array[index];
	        }

	        return sortedArray;
	    }

}