{-# OPTIONS_GHC -Wall -O2 #-}
import Data.List
import qualified Data.ByteString.Char8 as BC
import Data.Maybe (fromJust)
import Control.Applicative

f :: [Int] -> [String]
f (n:k:_)
    | node < 0  = ["-1"]
    | otherwise = (show node) : [shows x " " ++ show y | x <- [1,3..(node*2)] , y <- [2,4..(node*2)]]
    where
      node = k - ((n-1) * (n-2) `div` 2)

main :: IO()
main = getLine >>= putStr . unlines . f . map read . words
