from math import hypot, isclose # Golfed from maarten-zigzag-symmetric.py (n, m), l = map(int, input().split()), float(input()) if isclose(l, hypot(n, m)): print(f"2\n0 0\n{n} {m}"), exit() zz, ds = [(i * n % (2 * n), i / 2) for i in range(int(m) * 2)], [i * hypot(n, 0.5) for i in range(int(m) * 2)] # Could also `import bisect`, but that's an extra line 😇 s, a = [d + hypot(n - x, m - y) > l for (x, y), d in zip(zz, ds)].index(True), n / 2 # Binary search for the in-between point to finish the cable for da in (n / 4 / 2 ** i for i in range(30)): a += da if hypot(a, 0.5) + hypot(n - a if s & 1 else a, m - zz[s][1]) < l - ds[s - 1] else -da print(str(s + 2) + "\n" + "\n".join(f"{a} {b}" for a, b in (*zz[:s], (a if s & 1 else n - a, (zz[s][1])), (n, m))))