#include <bits/stdc++.h>
using namespace std;
long long ans;
struct node {
  long long x, y;
  bool operator<(const node &z) const {
    if (x == z.x) return y < z.y;
    return x < z.x;
  }
  bool operator==(const node &z) const { return x == z.x && y == z.y; }
} a[500010];
int main() {
  long long i, x, y;
  scanf("%I64d", &x);
  x *= 6;
  for (i = 1; i * i * i <= x; ++i) {
    if (x % (i * (i + 1))) continue;
    y = x / (i * (i + 1)) + i - 1;
    if (y / 3 < i) continue;
    if (!(y % 3)) {
      ++ans, a[ans].x = i, a[ans].y = y / 3;
      ++ans, a[ans].x = y / 3, a[ans].y = i;
    }
  }
  sort(a + 1, a + 1 + ans);
  ans = unique(a + 1, a + 1 + ans) - (a + 1);
  printf("%I64d\n", ans);
  for (i = 1; i <= ans; ++i) {
    printf("%I64d %I64d\n", a[i].x, a[i].y);
  }
  return 0;
}
