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