#include <bits/stdc++.h>
using namespace std;
const int maxn = 10000000;
int n;
int pr(int p) {
  if (p < 2) return 0;
  if (p == 2) return 1;
  for (int i = 2; i * i <= p; i++) {
    if (p % i == 0) return 0;
  }
  return 1;
}
int main() {
  cin >> n;
  if (pr(n)) {
    cout << 1 << endl << n;
  } else if (pr(n - 2)) {
    cout << 2 << endl << 2 << " " << n - 2;
  } else {
    cout << 3 << endl << 3 << " ";
    n -= 3;
    for (int i = 4; i <= n; i++) {
      if (pr(i) && pr(n - i)) {
        cout << i << " " << n - i;
        return 0;
      }
    }
  }
  return 0;
}
