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>
time_t st = clock();
using namespace std;
template <class stl>
void DBGSTL(stl a) {
  cerr << "\tDEBUG:\n\t";
  for (typeof(a.begin()) i = a.begin(); i != a.end(); i++) {
    cerr << *i << " ";
  }
  cerr << "\n";
  return;
}
template <class T>
inline T max(T a, T b, T c) {
  return max(a, max(b, c));
}
template <class T>
inline T min(T a, T b, T c) {
  return min(a, min(b, c));
}
template <class T>
T gcd(T a, T b) {
  return (b == (T)0 ? a : gcd(b, a % b));
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
T mathround(T x) {
  long long i64x = (long long)x;
  if (x < i64x + 0.5) return (T)i64x;
  return (T)i64x + 1;
}
template <class T>
bool isprime(T x) {
  int till = (T)sqrt(x + .0);
  if (x == 1) return 0;
  if (x == 2) return 1;
  if (x % 2 == 0) return 0;
  for (int i = 3; i <= till; i += 2)
    if (x % i == 0) return 0;
  return 1;
}
template <class T>
double geodist(T x1, T y1, T x2, T y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + .0);
}
const double Pi = 4.0 * atan(1.0);
long long n, m;
int main() {
  cin >> n >> m;
  if (m == 3 && n - m > 1) {
    cout << -1;
    return 0;
  }
  long long x = 0;
  long long y = 1;
  for (int i = m; i > 0; i--) {
    cout << i + 1000000 << " " << x << "\n";
    x += y;
    y++;
  }
  x = 0;
  y = 1;
  for (int i = n - m; i > 0; i--) {
    cout << -i << " " << x << "\n";
    x += y;
    y++;
  }
  return EXIT_SUCCESS;
}