program test
integer :: N, i, j, M
read(*, *) N
M = N - mod(N, 2)
do i = 1, M
    do j = i + 1, M
        if(j /= M - i - 1) write(*, "(i0, a, i0)") i, " ", j
    enddo 
enddo
if (mod(N, 2) == 1)then
    do i = 1, M
        write(*, "(i0, a, i0)") i, " ", N
    enddo 
endif

end program test