def main():

    n, m = list(map(int, input().split()))

    if n & 1:

        for i in range(m):

            print((i+1, n-i))

    else:

        i = 0

        flag = False

        for i in range(m):

            if n-2*i-1 > n//2:

                print((i+1, n-i))

            else:

                print((i+1, n-i-1))



if __name__ == "__main__":

    main()
def main():

    n, m = list(map(int, input().split()))

    if n%2:

        for i in range(m):

            print((i+1, n-i))

    else:

        for i in range(m):

            if n-2*i-1 > n//2:

                print((i+1, n-i))

            else:

                print((i+1, n-i-1))



if __name__ == "__main__":

    main()
def main():
    n, m = list(map(int, input().split()))
    if n & 1:
        for i in range(m):
            print((i + 1, n - i))
    else:
        i = 0
        flag = False
        for i in range(m):
            if n - 2 * i - 1 > n // 2:
                print((i + 1, n - i))
            else:
                print((i + 1, n - i - 1))


if __name__ == "__main__":
    main()

def main():
    n, m = list(map(int, input().split()))
    if n % 2:
        for i in range(m):
            print((i + 1, n - i))
    else:
        for i in range(m):
            if n - 2 * i - 1 > n // 2:
                print((i + 1, n - i))
            else:
                print((i + 1, n - i - 1))


if __name__ == "__main__":
    main()

-    if n & 1: +    if n % 2: -        i = 0 -        flag = False