#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (m == 3 && n > 4) return puts("-1"), 0;
  for (int i = 1; i <= m; i++) printf("%d %d\n", i, i * i + 100000);
  for (int i = 1; i <= n - m; i++) printf("%d %d\n", -i, -i * i - 100000);
  return 0;
}
