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