#include using namespace std; #define all(v) v.begin(),v.end() using ll = long long; using ull = unsigned long long; using vll=vector; using vvll = vector>; using P = pair; using vp=vector>; const ll INF=1ll<<60; ll mod10=1e9+7; ll mod99=998244353; const double PI = acos(-1); #define rep(i,n) for (ll i=0;i=0;--i) #define rep2(i,a,n) for (ll i=a;i=n;--i) int main(){ ll N; cin>>N; set> st; rep2(i,0,N){ if(i*i>N)break; rep2(j,1,N){ if(j*j>N)break; if((N-i*j)%(i+j)==0){ ll z=(N-i*j)/(i+j); st.emplace(i,j,z); st.emplace(i,z,j); st.emplace(j,i,z); st.emplace(j,z,i); st.emplace(z,i,j); st.emplace(z,j,i); } } } cout << st.size() << endl; for(auto [x,y,z]:st) cout<