#include <bits/stdc++.h>
using namespace std;
const unsigned long long P = 239017, MaxN = 2100000, INF = 100000000;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (n >= 5 && m == 3) {
    printf("-1");
    return 0;
  }
  for (int i = 0; i < m; ++i) printf("%d %d\n", i - m, i * i);
  for (int i = 0; i < n - m; ++i) printf("%d %d\n", -i, -i * i);
  return 0;
}
