#include <bits/stdc++.h>
using namespace std;
vector<long long> a(5123456);
int main() {
  std::ios::sync_with_stdio(false);
  for (int i = 0; i < 5123456; i++) a[i] = 0;
  a[1] = 1;
  for (int i = 2; i < 5123456; i++) {
    a[i] = a[i - 1] + ((long long)i * (i + 1)) / 2;
  }
  vector<pair<long long, long long> > fa;
  long long k;
  cin >> k;
  long long ans = k + 1;
  for (int i = 1; i < 5123456; i++) {
    long long n = ((long long)i * (i + 1)) / 2;
    long long other = a[i - 1];
    other += k;
    if (other % n == 0) {
      ans = other / n;
      if (ans < i) break;
      fa.push_back(make_pair(i, other / n));
    }
  }
  int nn = fa.size();
  for (int i = nn - 1; i >= 0; i--) {
    if (fa[i].first != fa[i].second)
      fa.push_back(make_pair(fa[i].second, fa[i].first));
  }
  cout << fa.size() << endl;
  for (int i = 0; i < fa.size(); i++)
    cout << fa[i].first << " " << fa[i].second << endl;
  return 0;
}
