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