The Chef has one long loaf of bread of length 1. He wants to cut it into as many little loaves as he can. But he wants to adhere to the following rule: At any moment, the length of the longest loaf which he possesses may not be larger than the length of shortest one, times some constant factor. Every time, he is only allowed to cut exactly one loaf into two shorter ones.

-----Input-----
One floating-point number, 1 ≤ k ≤ 1.999, meaning the stated constant factor. The number will have at most 3 digits after the decimal point.

-----Output-----

First, you should output one number n, the maximal achievable number of loaves for the given value of the constant factor. Then, you should output any proof that this number of loaves is in fact achievable: n-1 descriptions of cutting, using the following notation. At each step, you print two numbers: first, the index of the loaf that you want to cut into two parts; second, the length of the newly created loaf (cut off from the original one). It is assumed that the starting loaf has index 0. Each newly created loaf will be given the lowest possible free integer index (so, at the ith step this will be i). Each time, the size of size of the original loaf will be decreased by the size of the newly created loaf.

-----Example-----
Input:
1.5
Output:
4
0 0.4
0 0.3
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\nfrom math import log\n\nk = float(sys.stdin.readline())\nanswer = int(log(2.0, 2.0/k))\nprint(2*answer)\n\nm = 2 ** (1.0/answer)\n# m = 2.0/k\nthesum = 0\nfor i in range(answer):\n thesum += m**i\n# print [m**i/thesum for i in xrange(answer)]\nloaves = [1]\n\ndef maxIndex(list):\n max = -1\n mi = -1\n for i, x in enumerate(list):\n  if x > max:\n   max = x\n   mi = i\n return mi\n\ndesired = [m**i/thesum for i in range(answer)]\ndesired.reverse()\n# print desired\ncuts = []\nwhile len(desired) > 1:\n cuts.append(desired[-1])\n lastsum = desired[-1] + desired[-2]\n del desired[-2:]\n desired[0:0] = [lastsum]\n\n# print cuts\n\nwhile cuts:\n length = cuts.pop()\n i = maxIndex(loaves)\n print(i, length)\n loaves[i] -= length\n loaves.append(length)\n # print loaves\n\n# print loaves\nfor i in range(answer):\n i = maxIndex(loaves[:answer])\n x = loaves[i]/2.0\n print(i, x)\n loaves.append(x)\n loaves[i] -= x\n# print loaves\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13657