#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define popcount __builtin_popcount using namespace std; typedef long long int ll; typedef pair P; vector> f; ll ans; vector, ll>> v; ll a[4]; void dfs(int k, ll x, ll y, ll z, ll w){ if(k==f.size()){ a[0]=x, a[1]=y, a[2]=z, a[3]=w; sort(a, a+4); if(a[3]==a[0]+a[1]+a[2]){ v.push_back({{a[3]-a[2], a[3]-a[1]}, a[3]-a[0]}); } return; } ll q[40]; q[0]=1; for(int i=0; if[k].second-i-j-l) break; dfs(k+1, x*q[i], y*q[j], z*q[l], w*q[f[k].second-i-j-l]); } } } } int main() { ll n; cin>>n; if(n==1){ cout<<0<1) f.push_back({n1, 2}); dfs(0, 1, 1, 1, 1); sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end()); cout<