This morning Tolik has understood that while he was sleeping he had invented an incredible problem which will be a perfect fit for Codeforces! But, as a "Discuss tasks" project hasn't been born yet (in English, well), he decides to test a problem and asks his uncle.

After a long time thinking, Tolik's uncle hasn't any ideas on how to solve it. But, he doesn't want to tell Tolik about his inability to solve it, so he hasn't found anything better than asking you how to solve this task.

In this task you are given a cell field $n \cdot m$, consisting of $n$ rows and $m$ columns, where point's coordinates $(x, y)$ mean it is situated in the $x$-th row and $y$-th column, considering numeration from one ($1 \leq x \leq n, 1 \leq y \leq m$). Initially, you stand in the cell $(1, 1)$. Every move you can jump from cell $(x, y)$, which you stand in, by any non-zero vector $(dx, dy)$, thus you will stand in the $(x+dx, y+dy)$ cell. Obviously, you can't leave the field, but also there is one more important condition — you're not allowed to use one vector twice. Your task is to visit each cell of the field exactly once (the initial cell is considered as already visited).

Tolik's uncle is a very respectful person. Help him to solve this task!


-----Input-----

The first and only line contains two positive integers $n, m$ ($1 \leq n \cdot m \leq 10^{6}$) — the number of rows and columns of the field respectively.


-----Output-----

Print "-1" (without quotes) if it is impossible to visit every cell exactly once.

Else print $n \cdot m$ pairs of integers, $i$-th from them should contain two integers $x_i, y_i$ ($1 \leq x_i \leq n, 1 \leq y_i \leq m$) — cells of the field in order of visiting, so that all of them are distinct and vectors of jumps between them are distinct too.

Notice that the first cell should have $(1, 1)$ coordinates, according to the statement.


-----Examples-----
Input
2 3

Output
1 1
1 3
1 2
2 2
2 3
2 1
Input
1 1

Output
1 1



-----Note-----

The vectors from the first example in the order of making jumps are $(0, 2), (0, -1), (1, 0), (0, 1), (0, -2)$.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'import sys\nimport math\nfrom collections import defaultdict\nn,m=list(map(int,sys.stdin.readline().split()))\n#cur=[1,1]\n#ans=[-1 for _ in range(2*n*m)]\nup,down=1,n\ncount=0\nwhile up<=down:\n    left,right=1,m\n    #ans.append(cur)\n    while left<=m and count<n*m:\n        #ans.append([up,left])\n        #ans[count]=[up,left]\n        if count<n*m:\n            sys.stdout.write((str(up)+" "+str(left)+"\\n"))\n        count+=1\n        left+=1\n        #ans[count]=[down,right]\n        if count<n*m:\n            sys.stdout.write((str(down)+" "+str(right)+"\\n"))\n        count+=1\n            #ans.append([down,right])\n        right-=1\n    up+=1\n    down-=1\n\'\'\'if n==1:\n    a=len(ans)\n    #print(a,\'a\')\n    for i in range(a//2):\n        print(ans[i][0],ans[i][1])\nelse:\n    a=len(ans)\n    for i in range(a//2):\n        print(ans[i][0],ans[i][1])\n    #print(ans)\'\'\'\n        \n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13911