#include <bits/stdc++.h>
using namespace std;
bool judge(long long x) {
  if (x == 2 || x == 3) return 1;
  long long cnt = sqrt(x);
  for (long long i = 2; i <= cnt; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
int main() {
  long long n;
  cin >> n;
  if (n == 3) {
    cout << 1 << endl;
    cout << 3;
    return 0;
  } else if (n == 5) {
    cout << 1 << endl;
    cout << 5;
    return 0;
  } else if (n == 7) {
    cout << 1 << endl;
    cout << 7;
    return 0;
  }
  for (long long i = 2; i <= n; i++) {
    if (i % 2 != 0 || i == 2) {
      if ((n - 5 - i) % 2 != 0 || (n - 5 - i) == 2) {
        if (judge(i) == 1 && judge(n - 5 - i) == 1) {
          cout << 3 << endl;
          cout << 5 << " " << i << " " << n - i - 5;
          return 0;
        }
      }
    }
  }
  return 0;
}
