#include <bits/stdc++.h>
using namespace std;
long n, c[long(1e7 + 50)], cnt;
void sieve() {
  c[1] = 1;
  for (long i = 2; i <= long(1e7); ++i)
    if (!c[i])
      for (long j = 2; i * j <= long(1e7); ++j) c[i * j] = 1;
}
bool Prime(long x) {
  if (x < long(1e7)) {
    if (c[x]) return false;
    return true;
  }
  for (long i = 2; i <= trunc(sqrt(x)); ++i)
    if (!(x % i)) return false;
  return true;
}
int main() {
  scanf("%ld", &n);
  if (n <= 7)
    printf("1\n%ld", n);
  else {
    printf("3\n");
    sieve();
    n -= 3;
    for (long i = n; i >= 1; --i)
      if (Prime(i) && Prime(n - i)) {
        printf("%ld %ld %ld", i, n - i, 3);
        return 0;
      }
  }
  return 0;
}
