#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  {
    int a, b, c;
    long long m, n;
    cin >> (n);
    set<pair<long long, long long> > ans;
    ans.insert(make_pair(1, n));
    ans.insert(make_pair(n, 1));
    double k = ceil(pow(n, 1.0 / 3));
    long long k2 = 2 * k;
    for (long long i = 2; i <= k2; i++) {
      double intm = ((n * 6.0) / (i * (i + 1.0))) + i - 1.0;
      m = intm / 3;
      if (i <= m && (n == ((i * (i + 1) * (3 * m - i + 1)) / 6))) {
        ans.insert(make_pair(i, m));
        ans.insert(make_pair(m, i));
      }
    }
    cout << ans.size() << "\n";
    set<pair<long long, long long> >::iterator it = ans.begin();
    for (; it != ans.end(); it++)
      cout << it->first << " " << it->second << "\n";
  }
}
