Problem: Convexity of a set of points on the plane is the size of the largest subset of points that form a convex polygon. Your task is to build a set of n points with the convexity of exactly m. Your set of points should not contain three points that lie on a straight line.

Input

The single line contains two integers n and m (3 ≤ m ≤ 100, m ≤ n ≤ 2m).

Output

If there is no solution, print "-1". Otherwise, print n pairs of integers — the coordinates of points of any set with the convexity of m. The coordinates shouldn't exceed 108 in their absolute value.

Examples

Input

4 3


Output

0 0
3 0
0 3
1 1


Input

6 3


Output

-1


Input

6 6


Output

10 0
-10 0
10 1
9 1
9 -1
0 -2


Input

7 4


Output

176166 6377
709276 539564
654734 174109
910147 434207
790497 366519
606663 21061
859328 886001

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
struct point {
  long long x, y;
  point() {}
  point(long long x, long long y) : x(x), y(y) {}
};
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  if (n >= 5 && m == 3) {
    cout << "-1\n";
    return 0;
  }
  vector<point> a;
  for (int i = 0; i < m; i++) {
    long double alfa = 2 * acos(-1) * i / m + 0.86132876312;
    a.push_back(point(cos(alfa) * 25000000, sin(alfa) * 25000000));
  }
  n -= m;
  if (n > 0) {
    a.push_back(point(100000000, 100000000));
    n--;
  }
  if (n > 0) {
    a.push_back(point(-100000000, -100000000));
    n--;
  }
  if (m >= 4) {
    if (n > 0) {
      a.push_back(point(100000000, -100000000));
      n--;
    }
    if (n > 0) {
      a.push_back(point(-100000000, 100000000));
      n--;
    }
  }
  if (m >= 5)
    if (n > 0) {
      a.push_back(point(7123, 871));
      n--;
    }
  for (int i = 0; i < n; i++) {
    long double alfa = 2 * acos(-1) * i / m + 0.0124412;
    a.push_back(point(cos(alfa) * 10000000, sin(alfa) * 10000000));
  }
  for (point i : a) cout << i.x << " " << i.y << "\n";
}