#include <bits/stdc++.h>
const int mod = 1000000007;
using namespace std;
bool isPrime(long long n) {
  if (n == 0 || n == 1) return false;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
void solve() {
  long long n;
  cin >> n;
  if (isPrime(n))
    cout << 1 << endl << n;
  else if (isPrime(n - 2))
    cout << 2 << endl << 2 << " " << n - 2;
  else {
    cout << 3 << endl;
    cout << 3 << " ";
    n = n - 3;
    long long a = n / 2;
    for (int i = 1;; i++) {
      if (isPrime(a - i) && isPrime(a + i)) {
        cout << a - i << " " << a + i;
        break;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long q = 1;
  while (q--) {
    solve();
  }
  return 0;
}
