#include<bits/stdc++.h>
using namespace std;
 
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef set<int> si;
typedef set<ll> sll;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
 
#define pvec(v) for(auto e: v) cout << e << " ";
#define IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define rep(i, a, b) for(int i = (a); i<(b); ++i)
#define pb push_back
#define INF 1000000005
#define MOD (1e18 + 5)
#define all(v) v.begin(), v.end()
 
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
 
ll power(ll x, ll y){  
    ll res = 1LL; 
    if (x == 0) return 0;
    while (y > 0){
        if (y & 1LL)  
            res = (res*x);
        y = y>>1LL; 
        x = (x*x);  
    }  
    return res;  
}  

long double log3(long double d) {
	return log(d*1.0)*1.0/log(3.0);
}

vi *adj;
vi vis, a, b;

void dfs(int u, ll &sum) {
	vis[u] = 1;
	sum += (a[u] - b[u])*1LL;
	for(int v: adj[u]) {
		if(!vis[v]) {
			dfs(v, sum);
		}
	}
}

int main(){
	IO
	int n, m;
	cin >> n >> m;
	
	if(m < 0 || (m > 0 && m + 2 > n)) {
		cout << -1 << '\n';
		return 0;
	}
	if( m == 0) {
		int l = 1, r = 5;
		for(int i = 0; i < n; ++i) {
			cout << l << " " << r << '\n';
			l+=5;
			r+=5;
		}
		return 0;
	}
	else {
		ll l = 2, r = 5;
		for(int i = 0; i <= m; ++i) {
			cout << l << " " << r << '\n';
			l+=5;
			r+=5;
			--n;
		}
		cout << 1 << " " << r << '\n';
		--n;
		l+=5;
		r+=5;
		while(n) {
			cout << l << " " << r << '\n';
			l += 5;
			r += 5;
			--n;
		}
	}
	return 0;
}

























#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ull = unsigned long long;
using vll = vector<ll>;
using vi = vector<int>;
using vb = vector<bool>;
using vs = vector<string>;
using pll = pair<ll, ll>;
using pii = pair<int, int>;
using vpii = vector<pii>;
using vpll = vector<pll>;
const ll LINF = 1ll << 55;
const ll INF = 0x3f3f3f3f;
const ll MOD = 1e9 + 7;
const int MAXN = 1e5 + 10;
const ll dx[] = {1, 0, -1, 0};
const ll dy[] = {0, 1, 0, -1};

/// cin/cout overloading
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &vec) {
  for (auto it = vec.begin(); it != vec.end(); ++it) {
    out << *it << " ";
  }
  return out;
}

template <typename T>
ostream &operator<<(ostream &out, const pair<T, T> &P) {
  out << P.first << " " << P.second;
  return out;
}

template <typename T>
istream &operator>>(istream &in, vector<T> &vec) {
  for (auto it = vec.begin(); it != vec.end(); ++it) {
    in >> *it;
  }
  return in;
}

template <typename T>
istream &operator>>(istream &in, pair<T, T> &P) {
  in >> P.first >> P.second;
  return in;
}

#define error(args...)                       \
  {                                          \
    string _s = #args;                       \
    replace(_s.begin(), _s.end(), ',', ' '); \
    stringstream _ss(_s);                    \
    istream_iterator<string> _it(_ss);       \
    err(_it, args);                          \
    cerr << endl;                            \
  }

void err(istream_iterator<string>) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << ", ";
  err(++it, args...);
}

#define rep(i, begin, end) \
  for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define all(x) (x).begin(), (x).end()
#define coutp(x, y) cout << (x) << " " << (y) << endl
#define coutn(x) cout << (x) << endl
#define coutd(x) cout << setprecision(10) << (x) << endl

ll calc(const string &S) {
  ll res = 0;
  for (int i = 1; i <= 9; ++i) {
    ll base = 1;
    for (auto c : S) {
      if (c - '0' == i) {
        base *= 10;
      }
    }
    res += i * base;
  }
  return res;
}

/// main函数
int main() {
  ll A, B;
  cin >> A >> B;
  double ans = (double(A) - B) / A * 100;
  coutd(ans);
  return 0;
}
