#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long> > ans;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long x;
  cin >> x;
  x *= 6;
  long long i, temp;
  for (i = 1; i * i * i <= x; i++) {
    temp = i * (i + 1);
    if (x % temp == 0) {
      temp = x / temp;
      temp = temp + i - 1;
      if (temp % 3 == 0) {
        temp /= 3;
        if (temp > i) {
          ans.push_back(make_pair(i, temp));
          ans.push_back(make_pair(temp, i));
        } else if (temp == i)
          ans.push_back(make_pair(i, temp));
      }
    }
  }
  sort(ans.begin(), ans.end());
  cout << ans.size() << "\n";
  for (i = 0; i < ans.size(); i++)
    cout << ans[i].first << " " << ans[i].second << "\n";
}
