{-# LANGUAGE BangPatterns #-}


import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Unboxed.Mutable as UM
import qualified Data.Vector as V
import qualified Data.ByteString.Char8 as C
import Debug.Trace
import Data.List
import Control.Monad
import Control.Arrow
import Data.Ord
import Data.Maybe
import Numeric
import Data.Char
import Text.Printf
import qualified Data.IntMap.Strict as IM

r :: Int -> IO (U.Vector Int)
r n = U.unfoldrN n (C.readInt . C.dropWhile (==' ')) <$> C.getLine


r' :: IO [Int]
r'  =   unfoldr    (C.readInt . C.dropWhile (==' ')) <$> C.getLine

type Infant = (Int,Int)

main :: IO ()
main = do
    [n,m] <- r'
    mapM_ (printTup.solve n) [1..m]

solve n x = (1,1+x)
printTup (a,b) = putStrLn $ show a ++ " " ++ show b