import sys
inf = sys.stdin
out = sys.stdout
n = int(inf.readline().rstrip())
correct = n // 10
incorrect = n - correct
for x in range(n+1):
  y = n - x
  mn = n - (min(correct, y) + min(incorrect, x))
  mx = min(correct, x) + min(incorrect, y)
  out.write(f'{mn} {mx}\n')