Type: Default 1000ms 256MiB

线性代数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Problem Description

bsggbsgg在复习考研线性代数的时候遇到了这样的一道模拟题,请你输出一个 nn 阶矩阵 AA ,且每个矩阵的值只能是 00 或者 11 ,并且这个矩阵中要有恰好 n−1n-1 个 11 ,对于给定的 kk ,使得当 0<x≤ k0 < x \le \ k 时, AxA^{x} 不为 00 矩阵,当 x>kx > k 时,AxA^{x} 是 00 矩阵

若有多种答案输出一种即可,若无法构造输出 −1-1

聪明的你可以帮帮 bsggbsgg 吗

Input Format

一行输入两个整数n,kn,k

Output Format

若无满足条件的矩阵输出 −1-1

否则输出 n−1n-1 行,每一行两个整数 i,ji,j 表示矩阵第 ii 行第 jj 列为 11,ii,jj 均从1开始

Sample

3 1

输出

1 2
1 3

Hint

1≤n,k≤106 1 \le n , k \le 10^{6}