#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  cin >> n >> m;
  if (m == 3) {
    if (n >= 5) {
      cout << -1;
      return 0;
    }
    if (n == 4) {
      cout << "0 0\n";
      cout << "0 3\n";
      cout << "3 0\n";
      cout << "1 1";
      return 0;
    }
    if (n == 3) {
      cout << "0 0\n";
      cout << "0 1\n";
      cout << "10 0";
    }
    return 0;
  }
  for (int i = 1; i <= m; ++i) {
    cout << i << ' ' << 10000000 + i * i << '\n';
  }
  for (int i = 1; i <= n - m; ++i) {
    cout << -i << ' ' << -10000000 - i * i << '\n';
  }
  return 0;
}
