#include <bits/stdc++.h>
using namespace std;
long long X;
vector<pair<int, long long> > ans;
void solve() {
  cin >> X;
  for (int n = 1; n < 1500000; ++n) {
    long long n_ = X * 6 + 1LL * n * n * n - n;
    long long _d = 3LL * n * (n + 1);
    if (n_ % _d == 0 and 1LL * n <= n_ / _d) ans.push_back({n, n_ / _d});
  }
  int square_cnt = 0;
  for (int i = 0; i < ans.size(); ++i)
    if (ans[i].first == ans[i].second) ++square_cnt;
  cout << ans.size() * 2 - square_cnt << "\n";
  for (int i = 0; i < ans.size(); ++i)
    cout << ans[i].first << " " << ans[i].second << "\n";
  for (int i = ans.size() - 1; i >= 0; --i)
    if (ans[i].first != ans[i].second)
      cout << ans[i].second << " " << ans[i].first << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
