fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let mut s: u64 = s.trim().parse().unwrap(); let mut v = vec![]; while s > 0 { let mut i = (s as f64).sqrt() as u64; while s < i * i { i -= 1; } s -= i * i; v.push(i * i); } println!( "{}\n{}", v.len(), v.iter() .map(|x| x.to_string()) .collect::>() .join(" ") ) }