#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long> > ans, ans2;
int main() {
  long long n;
  scanf("%lld", &n);
  long long sum1 = 0;
  long long sum2 = 0;
  for (long long i = 1; i <= 1500000; i++) {
    sum1 += i;
    sum2 += i * (i - 1);
    if ((n - sum2) % sum1 == 0) {
      long long y = (n - sum2) / sum1 + (i - 1);
      if (y < i) break;
      ans.push_back({i, y});
      if (y == i) break;
      ans2.push_back({y, i});
    }
  }
  printf("%d\n", ans.size() + ans2.size());
  for (int i = 0; i < ans.size(); i++) {
    printf("%lld %lld\n", ans[i].first, ans[i].second);
  }
  for (int i = ans2.size() - 1; i >= 0; i--) {
    printf("%lld %lld\n", ans2[i].first, ans2[i].second);
  }
  return 0;
}
