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.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer buffer;

    static void print(boolean[][]a) {
        for (int i=0;i<a.length;i++) {
            for (int j=0;j<a[0].length;j++) {
                out.print(a[i][j] ? "1 ": "0 ");
            }
            out.println();
        }
    }

    public static void solve() {
        int n = ni(), k = ni();
        if (k>n*n) {
            out.println(-1);
            return;
        }

        boolean[][]a = new boolean[n][n];
        if (k==0) {
            print(a);
            return;
        }

        for (int i=0;i<n;i++) {
            if (k==0) {
                print(a);
                return;
            } else {
                a[i][i] = true;
                k--;

                if (k == 1) {
                    if (i==n-1) {
                        out.println(-1);
                        return;
                    } else {
                        a[i+1][i+1] = true;
                        print(a);
                        return;
                    }
                } else {
                    int pos = i + 1;
                    while (k > 1 && pos < n) {
                        a[i][pos] = a[pos][i] = true;
                        k -= 2;
                        pos++;
                    }
                }
            }
        }

        print(a);

    }

    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

    static String next() {
        while (buffer == null || !buffer.hasMoreElements()) {
            try {
                buffer = new StringTokenizer(in.readLine());
            } catch (IOException e) {
            }
        }
        return buffer.nextToken();
    }

    static int ni() {
        return Integer.parseInt(next());
    }

    static long nl() {
        return Long.parseLong(next());
    }

    static double nd() {
        return Double.parseDouble(next());
    }

    static String ns() {
        return next();
    }

    static int[] ni(int n) {
        int[] res = new int[n];
        for (int i = 0; i < n; i++)
            res[i] = Integer.parseInt(next());
        return res;
    }

    static long[] nl(int n) {
        long[] res = new long[n];
        for (int i = 0; i < n; i++)
            res[i] = Long.parseLong(next());
        return res;
    }

    static double[] nd(int n) {
        double[] res = new double[n];
        for (int i = 0; i < n; i++)
            res[i] = Double.parseDouble(next());
        return res;
    }

    static String[] ns(int n) {
        String[] res = new String[n];
        for (int i = 0; i < n; i++)
            res[i] = next();
        return res;
    }

}