#include <bits/stdc++.h>
using namespace std;
long long int max_b;
long long int get_size(long long int x, long long int a) {
  long long int orig = a * (a + 1) * (2 * a + 1) / 6;
  if (orig > x) return -1;
  long long int k = 2 * (x - orig);
  long long int denom = a * (a + 1);
  max_b = a + k / denom;
  if (k % denom == 0) {
    return max_b;
  } else
    return -1;
}
int main() {
  long long int x;
  cin >> x;
  if (x == 1) {
    cout << "1" << endl << "1 1" << endl;
    return 0;
  }
  long long int a = 1;
  max_b = x;
  vector<pair<long long int, long long int>> ans;
  long long int sum = 0;
  while (a < max_b) {
    long long int b = get_size(x, a);
    if (b != -1) {
      ans.push_back(make_pair(a, b));
      max_b = b;
      sum++;
      if (a != b) sum++;
    }
    a++;
  }
  cout << sum << endl;
  if (sum != 0) {
    for (auto &x : ans) {
      cout << x.first << " " << x.second << endl;
    }
    for (int i = (int)ans.size() - 1; i >= 0; i--) {
      if (ans[i].first != ans[i].second) {
        cout << ans[i].second << " " << ans[i].first << endl;
      }
    }
  }
}
