#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 7;
vector<pair<unsigned long long, unsigned long long> > v;
int main() {
  unsigned long long a;
  cin >> a;
  for (int m = 1;; m++) {
    unsigned long long num = 1ull * (m + 1) * m * (m - 1) + 6ull * a;
    unsigned long long den = 3ull * m * (m + 1);
    unsigned long long n = num / den;
    if (n < m) break;
    if (n * den == num) {
      v.push_back(make_pair(n, m));
      if (n != m) v.push_back(make_pair(m, n));
    }
  }
  sort(v.begin(), v.end());
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << endl;
  return 0;
}
