#include <bits/stdc++.h>
using namespace std;
int isPrime(int n) {
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (int p = 3; p * p <= n; p += 2)
    if (n % p == 0) return 0;
  return 1;
}
int main(int argc, char const *argv[]) {
  int n;
  scanf("%d", &n);
  if (n == 3) return 0 * printf("1\n3\n");
  int n2 = n - 2;
  while (!isPrime(n2)) n2--;
  if (n2 == n - 2) return 0 * printf("2\n2 %d\n", n - 2);
  int p = 2;
  for (;; p++)
    if (isPrime(p) and isPrime(n - n2 - p)) break;
  printf("3\n%d %d %d\n", p, n - n2 - p, n2);
  return 0;
}
