#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x;
  cin >> x;
  x *= 6;
  vector<pair<long long, long long>> res;
  for (int n = 1; n <= 1500000; n++) {
    long long cnt = (long long)n * (n + 1);
    if (x % cnt != 0) continue;
    cnt = x / cnt - 1 + n;
    if (cnt < 0) continue;
    if (cnt % 3 != 0) continue;
    cnt /= 3;
    if (cnt < n) continue;
    res.push_back(make_pair(n, cnt));
    if (n < cnt) res.push_back(make_pair(cnt, n));
  }
  sort(res.begin(), res.end());
  cout << res.size() << endl;
  for (auto x : res) cout << x.first << ' ' << x.second << endl;
  return 0;
}
