#include <bits/stdc++.h>
int main(void) {
  int n, m, i;
  scanf("%d%d", &n, &m);
  if (m == 3 && n > 4)
    printf("-1\n");
  else if (m == 3 && n == 4)
    printf("0 0\n0 3\n3 0\n1 1\n");
  else {
    for (i = 1; i <= m; i++) printf("%d %d\n", i, (n - i) * (n - i));
    for (i = 1; i <= n - m; i++) printf("%d %d\n", -i, -(n - i) * (n - i));
  }
  return 0;
}
