#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x;
  int cnt = 0;
  cin >> x;
  vector<pair<long long, long long>> d;
  for (long long i = 1; i * i <= x; i++) {
    long long up = x - (i - 1) * i * (2 * i - 1) / 6 + i * i * (i - 1) / 2;
    long long down = i * i - i * (i - 1) / 2;
    if (i > up / down) break;
    if (up % down == 0) {
      cnt += 2;
      d.push_back({i, up / down});
    }
  }
  if (d[d.size() - 1].first == d[d.size() - 1].second) cnt--;
  cout << cnt << endl;
  for (int i = 0; i < d.size(); i++) {
    cout << d[i].first << " " << d[i].second << endl;
  }
  if (d[d.size() - 1].first != d[d.size() - 1].second) {
    cout << d[d.size() - 1].second << " " << d[d.size() - 1].first << endl;
  }
  for (int i = d.size() - 2; i >= 0; i--) {
    cout << d[i].second << " " << d[i].first << endl;
  }
  return 0;
}
