#include using namespace std; using ll = long long; int main(){ int N, ans=0; cin >> N; vector> v; for (int x=0; x<=N; x++){ for (int y=0; y<=N/x; y++){ if (x == 0 && y == 0) continue; if (N-x*y >= 0 && (N-x*y)%(x+y) == 0){ v.push_back({x, y, (N-x*y)/(x+y)}); } } } cout << v.size() << '\n'; for (auto &x : v) cout << x[0] << " " << x[1] << " " << x[2] << '\n'; return 0; }