#include <bits/stdc++.h>
using namespace std;
const int X = 100000 + 5;
void MAIN() {
  long long x, n, m;
  cin >> x;
  vector<long long> a, b;
  for (long long m = 1; m <= x; m++) {
    long double z = m - 1;
    z += 6 * x / (m * (m + 1));
    z /= 3;
    n = z;
    if (n < m) {
      break;
    }
    for (n = z - 2; n <= z + 2; n++) {
      if ((n * 3LL - m + 1) * m * (m + 1) == 6 * x) {
        a.push_back(m);
        b.push_back(n);
      }
    }
  }
  int k = (int)a.size() - 1;
  if (a[k] == b[k]) k--;
  for (int i = k; i >= 0; i--) {
    a.push_back(b[i]);
    b.push_back(a[i]);
  }
  cout << (int)a.size() << '\n';
  for (int i = 0; i < (int)a.size(); i++) {
    cout << a[i] << " " << b[i] << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << setprecision(12);
  MAIN();
  return 0;
}
