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