#include <bits/stdc++.h>
using namespace std;
long long a[5000010];
int main() {
  long long d = 0;
  long long s = 0, t = 0;
  long long x, m, q;
  bool flag = false;
  cin >> x;
  if (sqrt(x) > 5000000)
    m = 5000000;
  else
    m = sqrt(x);
  for (long long i = 1; i <= m; i++) {
    s += i;
    t += i * i;
    if (t > x) break;
    if ((x - t) % s == 0) {
      d++;
      a[i] = (x - t) / s + i;
      if (a[i] == i) flag = true;
    }
  }
  if (flag == false)
    cout << d * 2 << endl;
  else
    cout << 2 * d - 1 << endl;
  for (int i = 1; i <= 5000001; i++)
    if (a[i] != 0) cout << i << " " << a[i] << endl;
  for (int i = 5000001; i >= 1; i--)
    if (a[i] != 0) {
      if (flag == true)
        flag = false;
      else
        cout << a[i] << " " << i << endl;
    }
}
