X = int(input()) s = [] if X == 1: s += [1] for i in range(2, 200001): if X % i == 0: c = 0 while X % i == 0: X //= i c += 1 if i == 2: s += [4] * (c // 2) + [2] * (c % 2) else: s += [i] * c N = len(s) + sum(s) if X == 1 and N <= 200000: print(N) t = len(s) for i in range(len(s) - 1): print(i + 1, i + 2) for i in range(len(s)): for j in range(t, t + s[i]): print(i + 1, j + 1) t += s[i] print(' '.join(['b'] * len(s) + ['g'] * sum(s))) else: print(-1)