#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
const int MAXN = 100000;
int DP[MAXN], MIN[MAXN], MAX[MAXN];
map<int, int> MAP;
int main() {
  long long x;
  cin >> x;
  vector<std::pair<long long, long long> > ans;
  for (long long n = 1; n <= 10000000; n++) {
    long long tmp = x;
    tmp += n * (n - 1) * n / 2;
    n--;
    tmp -= n * (n + 1) * (2 * n + 1) / 6;
    n++;
    long long Left = n * n - (n - 1) * n / 2;
    if (tmp % Left == 0) {
      long long m = tmp / Left;
      if (n < m) {
        ans.push_back(make_pair(n, m));
        ans.push_back(make_pair(m, n));
      } else if (n == m) {
        ans.push_back(make_pair(m, n));
      }
    }
  }
  sort((ans).begin(), (ans).end());
  cout << ans.size() << endl;
  for (long long i = 0; i < (long long)ans.size(); i++)
    cout << ans[i].first << " " << ans[i].second << "\n";
  return 0;
}
