#include <bits/stdc++.h>
using namespace std;
int a[100005], l[100005], r[100005];
const int INF = 1e6 + 1e6 + 1e6;
vector<pair<long long, long long> > v;
int main() {
  long long x, i, tmp;
  cin >> x;
  x *= 6;
  for (i = 2; i <= INF; i++) {
    if (i * (i - 1) > x) break;
    if (x % (i * (i - 1)) != 0) continue;
    tmp = x / (i * (i - 1)) + i + 1;
    if (tmp / 3 < i) break;
    if (tmp % 3 != 0) continue;
    tmp /= 3;
    v.push_back(make_pair(i - 1, tmp - 1));
  }
  int num = (int)v.size();
  if (v[num - 1].first != v[num - 1].second)
    v.push_back(make_pair(v[num - 1].second, v[num - 1].first));
  for (int i = num - 2; i >= 0; i--)
    v.push_back(make_pair(v[i].second, v[i].first));
  cout << (int)v.size() << endl;
  for (int i = 0; i < v.size(); i++)
    printf("%I64d %I64d\n", v[i].first, v[i].second);
}
