import Data.List
main = do
  n <- readLn
  let m = f n :: [[Int]]
  mapM_ printT $ nub . concat . map (\(x,ys) -> map (\z -> (min x z,max x z)) ys) $ map (\(x,y)-> (x, concat y)) [ (b,p) | a <- m, b <- a, let p = filter (/= a) m]
  
f :: Int -> [[Int]]
f x
  | odd x     = [x] : f (x-1)
  | otherwise = zipWith (\a b -> [a,b]) [1..x `div` 2] [x,x-1..]

printT (a,b) = putStrLn $ show a ++ " " ++ show b