#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long maxN = 1e6 + 9;
const long long inf = 1e10;
long long x;
vector<pair<long long, long long> > res;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> x;
  for (long long i = (1); i <= (2000009); i++) {
    long long tmp1 = 6 * x - i + i * i * i;
    long long tmp2 = 3 * i * (i + 1);
    if (tmp1 % tmp2 == 0 && tmp1 >= tmp2) {
      if (i > tmp1 / tmp2) break;
      res.push_back(make_pair(i, tmp1 / tmp2));
      if (tmp1 / tmp2 != i) res.push_back(make_pair(tmp1 / tmp2, i));
    }
  }
  sort(res.begin(), res.end());
  cout << res.size() << '\n';
  for (long long i = (0); i <= (res.size() - 1); i++)
    cout << res[i].first << " " << res[i].second << '\n';
  return 0;
}
