import math n = int(input()) m = int(n * (n + 1) / 2) x = math.gcd(n, m) ret = i = 1 while i * i <= x: i += 1 cnt = 1 while x % i == 0: x /= i cnt += 1 print(i, cnt - 1) ret *= (i**cnt - 1) / (i - 1) ret *= x + 1 if x > 1 else 1 print(int(ret))