#include <bits/stdc++.h>
using namespace std;
long long n, i, j, k, c = 0, s = 0;
long long prime(long long n1) {
  for (i = 2; i * i <= n1; i++) {
    if (n1 % i == 0) return 0;
  }
  return 1;
}
int main() {
  cin >> n;
  k = n;
  if (prime(n))
    cout << 1 << endl << n;
  else {
    while (!prime(n)) n--;
    c = k - n;
    if (prime(c))
      cout << 2 << endl << c << " " << n;
    else {
      for (j = 2; j <= c; j++) {
        if (prime(j) && prime(c - j)) {
          cout << 3 << endl << j << " " << c - j << " " << n;
          return 0;
        }
      }
    }
  }
}
