#include <bits/stdc++.h>
using namespace std;
const int N = 4111;
long long x, ans, dp;
set<pair<long long, long long> > aa;
int main(int argc, char** argv) {
  cin >> x;
  for (long long i = 1; i < 2097153; i++) {
    if ((6 * x + i * i * i - i) % (3 * i * i + 3 * i) == 0) {
      if (i <= (6 * x + i * i * i - i) / (3 * i * i + 3 * i)) {
        aa.insert(make_pair(i, (6 * x + i * i * i - i) / (3 * i * i + 3 * i)));
        aa.insert(make_pair((6 * x + i * i * i - i) / (3 * i * i + 3 * i), i));
      }
    }
  }
  cout << aa.size() << endl;
  for (set<pair<long long, long long> >::iterator i = aa.begin(); i != aa.end();
       i++)
    cout << (*i).first << " " << (*i).second << endl;
  return 0;
}
