n=int(input())
a=[]
for i in range(2,200000):
	while n%i==0:
		a.append(i)
		n//=i
if sum(a)+len(a)>=200000 or n!=1:
	print(-1)
elif n==1 and len(a)==0:
  print("""2
1 2
b g""")
else:
  k=["g"]
  print(sum(a)+len(a))
  nt=1
  nt2=2
  for i in range(len(a)):
    k+=["b"]
    print(nt,nt2)
    nt+=2
    for j in range(a[i]-1):
      print(nt2,nt)
      nt+=1
      k+=["g"]
    nt2=nt+1
  print(*k)