#include <bits/stdc++.h>
using namespace std;
int dr[] = {1, 0, -1, 0, -1, -1, 1, 1};
int dc[] = {0, -1, 0, 1, -1, 1, -1, 1};
const int MAX = 1e6 + 7;
const int MOD = 1e7 + 7;
vector<pair<long long, long long> > ans;
int main() {
  long long x;
  cin >> x;
  for (long long n = 1, m; n * n * n <= 8 * x; ++n) {
    long long a = 6 * x + n * n * n - n, b = 3 * (n * n + n);
    if (a % b != 0) continue;
    m = a / b;
    if (m < n) break;
    ans.push_back(pair<long long, long long>(n, m));
  }
  cout << 2 * (long long)ans.size() - (ans[(long long)ans.size() - 1].first ==
                                       ans[(long long)ans.size() - 1].second)
       << "\n";
  for (int i = 0; i < (long long)ans.size(); ++i)
    cout << ans[i].first << " " << ans[i].second << "\n";
  for (int i = (long long)ans.size() - 1; i >= 0; --i)
    if (ans[i].first != ans[i].second)
      cout << ans[i].second << " " << ans[i].first << "\n";
}
