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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
long long invm(long long a, long long m) {
  a = a % m;
  for (long long x = 1; x < m; x++)
    if ((a * x) % m == 1) return x;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long gcdv(vector<long long> v) {
  long long a = 0;
  vector<long long>::iterator it = v.begin();
  a = *it;
  it++;
  for (; it != v.end(); it++) {
    a = gcd(a, *it);
  }
  return a;
}
vector<long long> SOE(long long n) {
  vector<bool> prime;
  for (long long i = 0; i <= n; i++) prime.push_back(true);
  vector<long long> v;
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * 2; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long p = 2; p <= n; p++)
    if (prime[p]) v.push_back(p);
  return v;
}
vector<long long> primeFactors(long long n) {
  long long k = 0, f = 0;
  vector<long long> v;
  while (n > 1) {
    f = 0;
    vector<long long> tv(SOE(sqrt(n)));
    for (vector<long long>::reverse_iterator it = tv.rbegin(); it != tv.rend();
         it++) {
      if ((n % (*it)) == 0) {
        v.push_back(*it);
        n /= *it;
        f = 1;
        break;
      }
    }
    if (f == 0) {
      v.push_back(n);
      break;
    }
  }
  return v;
}
int main() {
  int n, k;
  cin >> n >> k;
  int a[n][n];
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) a[i][j] = 0;
  if ((k > (n * n)))
    cout << -1;
  else {
    while (k > 0)
      for (int i = 0; ((i < n) && (k > 0)); i++)
        for (int j = 0; ((j < n) && (k > 0)); j++) {
          if (a[i][j] == 0 && a[j][i] == 0) {
            if (i == j) {
              a[i][j] = 1;
              k--;
            } else {
              if (k >= 2) {
                a[j][i] = 1;
                a[i][j] = 1;
                k -= 2;
              }
            }
          }
        }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        cout << a[i][j] << " ";
      }
      cout << endl;
    }
  }
}