#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long n;
  vector<pair<long long, long long> > res;
  cin >> n;
  long long x = 1, y;
  int flag = 0;
  while (1) {
    unsigned long long mo;
    unsigned long long son;
    mo = (6 * n) + (x * x * x) - x;
    son = 3 * (x * x + x);
    y = mo / son;
    if (y < x) break;
    if (mo % son == 0) {
      res.push_back(make_pair(x, y));
      if (x == y) {
        flag = 1;
        break;
      }
    }
    x++;
  }
  int len = res.size();
  if (flag)
    cout << len * 2 - 1 << endl;
  else
    cout << len * 2 << endl;
  int i;
  for (i = 0; i < len; i++) {
    cout << res[i].first << " " << res[i].second << endl;
  }
  i--;
  if (res[len - 1].second == res[len - 1].first) i--;
  for (; i >= 0; i--) {
    cout << res[i].second << " " << res[i].first << endl;
  }
}
