#include <bits/stdc++.h>
using namespace std;
bool isprime(int x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
int main() {
  int n, i;
  cin >> n;
  if (isprime(n)) {
    cout << 1 << endl;
    cout << n;
  } else {
    cout << 3 << endl;
    for (i = 3, n -= 3; i < n; i += 2)
      if (isprime(i) && isprime(n - i)) {
        cout << 3 << " " << i << " " << n - i << endl;
        return 0;
      }
  }
  return 0;
}
