// g++ A.cpp -std=c++14 -I . && ./a.out
#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
// using mint = modint1000000007;
// using mint = modint998244353;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, a, b) for (int i = a; i < (int)(b); i++)
#define rrep(i, a, b) for (int i = a; i > (int)(b); i--)
#define all(v) v.begin(), v.end()
using ll = long long;
const ll INF = 1e18;
// 変数定義
ll N, M, Q, a, b, c, d, x, y, t, T, total, cnt, ans;
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> N;
  vector<ll> X(N), Y(N);
  rep(i, N) cin >> X[i] >> Y[i];
  rep(i, N) rep2(j, i + 1, N) rep2(k, j + 1, N)
  {
    if ((X[i] - X[j]) * (Y[i] - Y[k]) == (Y[i] - Y[j]) * (X[i] - X[k]))
    {
      cout << "Yes" << '\n';
      return 0;
    }
  }
  cout << "No" << '\n';
  return 0;
}
#include<stdio.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#define MAXN 200005
#define max_num 1000000
#define LL long long
using namespace std;
int n, m;
int l[MAXN], r[MAXN];
int main()
{
    while(cin >> n >> m)
    {
        if(m < 0 || m == n || (m == n - 1 && n - 1 > 0))
        {
            puts("-1");
            continue;
        }
        if(n == 1)
        {
            puts("1 2");
            continue;
        }
        int num_w = n - m - 2;
        int now = max_num;
        for(int i = 0; i < num_w; i++)
        {
            r[i] = now;
            now--;
            l[i] = now;
            now--;
        }
        l[num_w] = 1;
        r[num_w] = (m + 2 + 1) * 2;
        now = (m + 2) * 2 - 1;
        for(int i = num_w + 1; i < n; i++)
        {
            r[i] = now;
            now--;
            l[i] = now;
            now--;
        }
        for(int i = 0; i < n; i++)
        {
            printf("%d %d\n", l[i], r[i]);
        }
    }
    return 0;
}