#include <bits/stdc++.h>
using namespace std;
int pr(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
int near(int n) {
  int i = 0;
  for (i = n - 2; i >= 2; i--) {
    if (pr(i)) break;
  }
  return i;
}
int main() {
  int i, n, s1, j = 0, s2 = 0, counter = 0, x = 0;
  int ara[10] = {0};
  cin >> n;
  if (pr(n)) {
    cout << 1 << endl;
    cout << n << endl;
    return 0;
  } else {
    s1 = near(n);
    ara[0] = s1;
    j++;
    s2 = n - s1;
    if (pr(s2) == 1) {
      printf("2\n");
      printf("%d %d", s1, s2);
      return 0;
    }
    x = near(s2);
    while (pr(s2 - x) == 0) {
      x = near(x - 1);
    }
    printf("3\n");
    printf("%d %d %d", s1, x, n - s1 - x);
    return 0;
  }
}
