#include <bits/stdc++.h>
using namespace std;
set<pair<long long, long long> > s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long x, a, b, c;
  scanf("%I64d", &x);
  for (a = 1; a < 2000001; a++) {
    b = a * (a + 1) * 3;
    c = a * (a * a - 1) + x * 6;
    if (c % b == 0 && a <= c / b) {
      s.insert(make_pair(a, c / b));
      s.insert(make_pair(c / b, a));
    }
  }
  printf("%d\n", (int)s.size());
  for (auto p : s) printf("%I64d %I64d\n", p.first, p.second);
}
