import std.stdio, std.array, std.string, std.conv, std.algorithm; import std.typecons, std.range, std.random, std.math, std.container; import std.numeric, std.bigint, core.bitop, std.bitmanip, std.regex; void main() { auto K = readln.chomp.to!int; bool is_prime(int n) { for (int i = 2; i * i <= n; ++i) if (n % i == 0) return false; return true; } int[] A = K % 2 ? [1, 1] : [2, 2]; int x = K % 2 ? 2 : 3; foreach (i; 1..20) { if (!((K >> i) & 1)) continue; foreach (j; 0..i) A ~= x; x += 2; while (!is_prime(x+A.front)) x += 2; } A.length.writeln; A.map!(to!string).join(" ").writeln; }