#include using namespace std; using int64 = long long; using uint64 = unsigned long long; #define repeat(i, x) for (int64 i = 0; (i) < (x); (i)++) #define rev_repeat(i, x) for (int64 i = (x) - 1; (i) >= 0; (i)--) #define countup(i, n) for (int64 i = 0; (i) <= (n); (i)++) #define countdown(i, n) for (int64 i = (n); (i) >= 0; (i)--) #define range(i, a, b) for (int64 i = (a); (i) < (b); (i)++) #define traverse(it, ctn) for (auto it = begin(ctn); (it) != end(ctn); (it)++) #define rev_traverse(it, ctn) for (auto it = rbegin(ctn); (it) != rend(ctn); (it)++) template ostream& operator<<(ostream& os, vector& vec) { os << "["; repeat (i, vec.size()) { os << (i == 0 ? "" : ", ") << vec[i]; } os << "]"; return os; } template ostream& operator<<(ostream& os, pair& p) { os << "(" << p.first << ", " << p.second << ")"; return os; } template ostream& operator<<(ostream& os, set& s) { os << "{"; traverse (it, s) { if (it != s.begin()) os << ", "; os << *it; } os << "}"; return os; } template ostream& operator<<(ostream& os, map& m) { os << "{"; traverse (it, m) { if (it != m.begin()) os << ", "; os << it->first << ": " << it->second; } os << "}"; return os; } // // _______ _____ _______ _____ _______ _______ _____ _______ _____ _ _ _______ // | | | | | | |_____] |______ | | | | \ / |______ // |_____ |_____| | | | | |______ | __|__ | __|__ \/ |______ // // _____ ______ _____ ______ ______ _______ _______ _______ _____ __ _ ______ / // |_____] |_____/ | | | ____ |_____/ |_____| | | | | | | | | \ | | ____ / // | | \_ |_____| |_____| | \_ | | | | | | | | __|__ | \_| |_____| . // int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int K; cin >> K; if (K == 0) { cout << 1 << endl; cout << 1 << endl; return 0; } // | 3 | 4 | 5 | 6 | int count3, count4, count5, count6; auto update = [&](int64 c3, int64 c4, int64 c5, int64 c6) { count3 = c3; count4 = c4; count5 = c5; count6 = c6; }; countup (cnt3, 250) { countup (cnt4, 250) { if (cnt3 + cnt4 <= 250 and cnt3 * cnt4 == K) { update(cnt3, cnt4, 0, 0); continue; } countup (cnt5, 250) { if (cnt5 == 0 or (K - (cnt3 * cnt4)) % cnt5 != 0) continue; int cnt6 = (K - (cnt3 * cnt4)) / cnt5; if (cnt6 >= 0 and cnt3 + cnt4 + cnt5 + cnt6 <= 250) { update(cnt3, cnt4, cnt5, cnt6); } } } } vector c; repeat (i, count3) c.push_back(3); repeat (i, count4) c.push_back(4); repeat (i, count5) c.push_back(5); repeat (i, count6) c.push_back(6); cout << c.size() << endl; for (auto e : c) { cout << e << " "; } cout << endl; return 0; }