Ivan places knights on infinite chessboard. Initially there are $n$ knights. If there is free cell which is under attack of at least $4$ knights then he places new knight in this cell. Ivan repeats this until there are no such free cells. One can prove that this process is finite. One can also prove that position in the end does not depend on the order in which new knights are placed.

Ivan asked you to find initial placement of exactly $n$ knights such that in the end there will be at least $\lfloor \frac{n^{2}}{10} \rfloor$ knights.


-----Input-----

The only line of input contains one integer $n$ ($1 \le n \le 10^{3}$) — number of knights in the initial placement.


-----Output-----

Print $n$ lines. Each line should contain $2$ numbers $x_{i}$ and $y_{i}$ ($-10^{9} \le x_{i}, \,\, y_{i} \le 10^{9}$) — coordinates of $i$-th knight. For all $i \ne j$, $(x_{i}, \,\, y_{i}) \ne (x_{j}, \,\, y_{j})$ should hold. In other words, all knights should be in different cells.

It is guaranteed that the solution exists.


-----Examples-----
Input
4

Output
1 1
3 1
1 5
4 4

Input
7

Output
2 1
1 2
4 1
5 2
2 6
5 7
6 6



-----Note-----

Let's look at second example:

$\left. \begin{array}{|l|l|l|l|l|l|l|l|l|} \hline 7 & {} & {} & {} & {} & {0} & {} & {} \\ \hline 6 & {} & {0} & {} & {} & {} & {0} & {} \\ \hline 5 & {} & {} & {} & {2} & {} & {} & {} \\ \hline 4 & {} & {} & {} & {} & {} & {} & {} \\ \hline 3 & {} & {} & {1} & {} & {} & {} & {} \\ \hline 2 & {0} & {} & {} & {} & {0} & {} & {} \\ \hline 1 & {} & {0} & {} & {0} & {} & {} & {} \\ \hline & {1} & {2} & {3} & {4} & {5} & {6} & {7} \\ \hline \end{array} \right.$

Green zeroes are initial knights. Cell $(3, \,\, 3)$ is under attack of $4$ knights in cells $(1, \,\, 2)$, $(2, \,\, 1)$, $(4, \,\, 1)$ and $(5, \,\, 2)$, therefore Ivan will place a knight in this cell. Cell $(4, \,\, 5)$ is initially attacked by only $3$ knights in cells $(2, \,\, 6)$, $(5, \,\, 7)$ and $(6, \,\, 6)$. But new knight in cell $(3, \,\, 3)$ also attacks cell $(4, \,\, 5)$, now it is attacked by $4$ knights and Ivan will place another knight in this cell. There are no more free cells which are attacked by $4$ or more knights, so the process stops. There are $9$ knights in the end, which is not less than $\lfloor \frac{7^{2}}{10} \rfloor = 4$.

Difficulty: VERY_HARD
Tags: Constructive algorithms
Expected Time Complexity: O(N)

Starter code:

Solutions:
import collections, atexit, math, sys, bisect
sys.setrecursionlimit(1000000)

def getIntList():
	return list(map(int, input().split()))
try:
	import numpy

	def dprint(*args, **kwargs):
		print(*args, **kwargs, file=sys.stderr)
	dprint('debug mode')
except Exception:

	def dprint(*args, **kwargs):
		pass
inId = 0
outId = 0
if inId > 0:
	dprint('use input', inId)
	sys.stdin = open('input' + str(inId) + '.txt', 'r')
if outId > 0:
	dprint('use output', outId)
	sys.stdout = open('stdout' + str(outId) + '.txt', 'w')
	atexit.register(lambda : sys.stdout.close())
(N,) = getIntList()
zz = ((1, -1), (0, 2), (1, -1))
now = (0, 0)
for i in range(N):
	print(now[0], now[1])
	now = (now[0] + zz[i % 3][0], now[1] + zz[i % 3][1])


gcd = lambda a, b: gcd(b, a % b) if b else a

def main():
	n = int(input())
	if n == 1:
		print(0, 0)
		return
	x = 2 * n // 3
	if 2 * n % 2:
		x += 1
	s = 0
	for i in range(x):
		print(i, 0)
		s += 1
	for j in range(1, x, 2):
		print(j, 3)
		s += 1
	while n - s:
		s += 1
		i += 1
		print(i, 0)
main()


n = int(input())
above = n // 3
below = n - above
for i in range(above):
	print(2 * i + 1, 3)
for i in range(below):
	print(i, 0)


n = int(input())
top = n // 3
for i in range(top):
	x = 1 + 2 * i
	print(str(x) + ' 3')
bot = n - top
for i in range(bot):
	print(str(i) + ' 0')


from sys import exit
n = int(input())
if n <= 10:
	for i in range(n):
		print(0, i)
	exit()
print(0, 0)
for i in range(4, n + 1, 3):
	k = i // 3 * 2
	print(k, 0)
	print(k - 1, 1)
	print(k - 2, 2)
k = (n + 1) // 3 * 2
if n % 3 == 0:
	print(k - 1, 1)
	print(k - 2, 2)
elif n % 3 == 2:
	print(k - 2, 2)


n = int(input())
anss = [(0, 0)]
for i in range(1, n):
	anss.append((0, i))
	anss.append((i, 0))
	anss.append((0, -i))
	anss.append((-i, 0))
for i in range(n):
	print(str(anss[i][0]) + ' ' + str(anss[i][1]))


for i in range(int(input())):
	print(2 * i // 3, 2 * i % 3)


from itertools import *
moves = [(x * mx, y * my) for (mx, my, (x, y)) in product((-1, 1), (-1, 1), ((1, 2), (2, 1)))]

def ac(l, x):
	if l == 0:
		return 0
	return l[x] if 0 <= x < len(l) else 0

def work():
	x = 1
	while x:
		x = 0
		for r in range(len(a)):
			for c in range(len(a[0])):
				if not a[r][c] and sum((ac(ac(a, r + dr), c + dc) for (dr, dc) in moves)) >= 4:
					a[r][c] = 1
					x = 1
for n in [int(input())]:
	cand = set()
	for i in range(1000):
		for (x, y) in ((0, i), (i, 0), (i, 1), (-i, 0), (-i, 1), (0, -i)):
			if x == 0 or x % 3 != 1:
				if n == len(cand):
					break
				cand.add((x, y))
	assert len(cand) == n
	for (x, y) in cand:
		print(x, y)


print('\n'.join((str(2 * i // 3) + ' ' + str(2 * i % 3) for i in range(int(input())))))


n = int(input())
k = n // 3
ans = []
for i in range(k):
	ans += [(0, 2 * i)]
	ans += [(1, 2 * i + 1)]
	ans += [(2, 2 * i)]
for i in range(n % 3):
	ans += [(-1000, -1000 + i)]
res = ''
for i in ans:
	res += ' '.join(map(str, i)) + '\n'
print(res)


n = int(input())
ctr = i = 0
while ctr < n:
	print(i, 0)
	ctr += 1
	if i % 2 and ctr < n:
		print(i, 3)
		ctr += 1
	i += 1


n = int(input())
print('0 0')
n -= 1
k = n // 2
p = n - k
x = -k // 2
while k > 0:
	if x != 0:
		print(x, 0)
		k -= 1
	x += 1
y = -p // 2
while p > 0:
	if y != 0:
		print(0, y)
		p -= 1
	y += 1


n = int(input())
for i in range(n // 3):
	print(-2, 1 + i * 2)
for i in range(n - n // 3):
	print(1, i)