#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    long long x;
    cin >> x;
    set<pair<long long int, long long int> > ans;
    for (long long int i = 1; i < 2000005; i++) {
      long long n = i;
      long long t1 = 6 * x + (n * n * n) - n;
      long long t2 = 3 * (n * n + n);
      if (t1 % t2 != 0 || (t1 / t2) <= 0)
        continue;
      else if (t1 / t2 >= i) {
        ans.insert({t1 / t2, i});
        ans.insert({i, t1 / t2});
      }
    }
    cout << (long long int)ans.size() << '\n';
    for (auto it = ans.begin(); it != ans.end(); it++)
      cout << it->first << " " << it->second << '\n';
  }
  return 0;
}
