local mfl, mce = math.floor, math.ceil local ffi = require("ffi") local C = ffi.C ffi.cdef[[ long long atoll(const char*); ]] local function lltonumber(str) return C.atoll(str) end local n = io.read() n = lltonumber(n) local t = {} while 0LL < n do local left, right = 1, 1000000007-6 while 1 < right - left do local mid = mfl((left + right) / 2) local v = 1LL * mid * mid if v <= n then left = mid else right = mid end end local z = 1LL * left * left n = n - z z = tostring(z):gsub("LL", "") table.insert(t, z) end print(#t) print(table.concat(t, " "))