#include <bits/stdc++.h>
using namespace std;
int n, k;
int judge(int n) {
  if (n == 2 || n == 3) return 1;
  for (int i = 2; i <= sqrt(n); i++)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  int i, j, m;
  scanf("%d", &n);
  if (judge(n))
    printf("1\n%d\n", n);
  else if (judge(n - 2))
    printf("2\n2 %d\n", n - 2);
  else if (judge(n - 4))
    printf("3\n2 2 %d\n", n - 4);
  else {
    for (i = n - 2; i >= n - 300 && i >= 1; i--)
      if (judge(i)) {
        k = i;
        m = n - i;
        break;
      }
    for (j = 2; j <= m; j++) {
      if (judge(j) && judge(m - j)) {
        printf("3\n%d %d %d\n", k, j, n - i - j);
        break;
      }
    }
  }
  return 0;
}
