#include <bits/stdc++.h>
using namespace std;
bool chmin(int& a, int b) { return b < a ? a = b, true : false; }
bool chmax(int& a, int b) { return b > a ? a = b, true : false; }
bool chmin(long long& a, long long b) { return b < a ? a = b, true : false; }
bool chmax(long long& a, long long b) { return b > a ? a = b, true : false; }
const int inf = 1e09 + 5e3;
const long long linf = 2e18 + 5e3;
const int mod = 1e9 + 7;
const int mxn = 1e5 + 30;
set<pair<long long, long long> > out;
void gen(unsigned long long x) {
  unsigned long long preva = 0, prevb = 0;
  for (unsigned long long i = 1; i <= 4e6 && i <= x; i++) {
    unsigned long long a = preva + i;
    unsigned long long b = prevb + preva;
    unsigned long long nx = x + b;
    if (nx % a == 0 && i <= nx / a) {
      out.insert({i, nx / a});
      out.insert({nx / a, i});
    }
    preva = a;
    prevb = b;
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long x;
  cin >> x;
  gen(x);
  cout << out.size() << '\n';
  for (auto blah : out) cout << blah.first << ' ' << blah.second << '\n';
}
