#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define test() int t; cin>>t; while(t--)
#define all(v) v.begin(),v.end()
#define st(v) sort(all(v))
#define stA(arr,n) sort(arr,arr+n)
#define dp(n,c) vector<vector<ll>> dp(n,vector<ll>(c,0))
#define vc(v,n,f) vector<ll> v(n,f)
#define vct(v) vector<ll> v
#define findInVec(v,key) (find(all(v),key)!=v.end())
#define findInSet(v,key) (v.find(key) != v.end())
#define findInStr(s,key) (s.find(key) != string::npos)
#define findInMap(m,key) (mp.find(key) != mp.end())
#define prt(i) cout<<i<<"\n"
#define fos(v) for(auto x:v)
#define fo(m,n,i) for(int i=m;i<n;i++)
#define Fo(m,n,i) for(int i=m;i>n;i--)
#define setbit(i) __builtin_popcount(i)
#define del(v,pos) v.erase(v.begin()+pos)
#define cnt(v,key) (count(all(v),key))
#define cnts(s,key) (s.count(key))
#define sumArr(a,s,e,sum)(accumulate(a+s,a+e,sum))
typedef long long ll;
using namespace std;
ll stringToLong(string s){stringstream raaz(s);ll x = 0;raaz >> x;return x;}
string longToString(ll k){stringstream ss;ss<<k;string s; ss>>s; return s;}
bool isPowerOfTwo(int n){if(n==0) return false; return (ceil(log2(n)) == floor(log2(n)));}
void scanArr(int *arr,int n){fo(0,n,i) cin>>arr[i];}
void printArr(int *arr,int n){fo(0,n,i) cout<<arr[i]<<" ";}
void scanVector(vector<ll> &v,int n){fo(0,n,i){int temp;cin>>temp;v.push_back(temp);}}
void printVector(vector<ll> v){fos(v) cout<<x<<" ";}
int main()
{
	IOS
    vc(v,3,0);
    fo(0,3,i)
    cin>>v[i];
    st(v);
    if(v[2]-v[1]==v[1]-v[0])
    prt("Yes");
    else
    prt("No");
    return 0;
}
#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <string>
#include <queue>
#include <algorithm>
#include <map>
#include <cmath>
#include <numeric>
#include <list>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <tuple>
#include <deque>
#include <complex>
#include <bitset>

using namespace std;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<long long, long long> pll;
typedef vector<pll> vpll;

typedef long double ld;
typedef vector<ld> vld;

typedef vector<bool> vb;

#define rep(i, n) for (ll i = 0; i < (n); i++)
#define reps(i, n) for (ll i = 1; i <= (n); i++)
#define rrep(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rreps(i, n) for (ll i = (n); i >= 1; i--)
#define all(v) (v).begin(), (v).end()

template <class T> void chmin(T& a, T b) { a = min(a, b);}
template <class T> void chmax(T& a, T b) { a = max(a, b);}

constexpr int INF = 1 << 30;
constexpr ll INFL = 1LL << 60;
constexpr ll MOD = 1000000007;
constexpr ld EPS = 1e-12;
ld PI = acos(-1.0);

void solve() {
    ll n, m;
    cin >> n >> m;
    if(n == 1) {
        if(m == 0) {
            cout << "1 2" << endl;
            return;
        }
        else {
            cout << -1 << endl;
            return;
        }
    }
    if(m < 0 || m >= n - 1) {
        cout << -1 << endl;
        return;
    }
    vll l(n), r(n);
    for(int i = 0; i < m + 1; ++i) {
        l[i] = 2 * i + 2;
        r[i] = l[i] + 1;
    }
    l[m + 1] = 1;
    r[m + 1] = r[m] + 1;
    for(int i = m + 2; i < n; ++i) {
        l[i] = 2 * (i - m - 2) + r[m + 1] + 1;
        r[i] = l[i] + 1;
    }
    rep(i, n) {
        cout << l[i] << ' ' << r[i] << endl;
    }
    return;
}

int main() {
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    solve();
}