#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using uint = unsigned int; using ll = long long; using ull = unsigned long long; constexpr ll TEN(int n) { return (n==0) ? 1 : 10*TEN(n-1); } template using V = vector; template using VV = V>; V v = {9, 22, 70, 37, 95, 12}; using P = pair; P ck(ll k, ll a) { int ma = -1; P res; for (int i = 0; i <= a; i++) { for (int j = 0; j <= a; j++) { int z = i*j; if (k < z) continue; if (ma < z) { ma = z; res = P(i, j); } } } return res; } V ans; void push(P p, ll a, ll b) { for (int i = 0; i < p.first; i++) { ans.push_back(a); } for (int i = 0; i < p.second; i++) { ans.push_back(b); } } int main() { ll k; cin >> k; P p1 = ck(k, 100); k -= p1.first*p1.second; P p2 = ck(k, 10); k -= p2.first*p2.second; P p3 = ck(k, 10); k -= p3.first*p3.second; push(p1, v[0], v[1]); push(p2, v[2], v[3]); push(p3, v[4], v[5]); cout << ans.size() << endl; for (ll d: ans) { cout << d << " "; } cout << endl; }