#include <bits/stdc++.h>
using namespace std;
bool prime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  for (long long i = 2; i * i <= n; ++i)
    if (n % i == 0) return false;
  return true;
}
int main() {
  long long n;
  cin >> n;
  int cnt = 1;
  if (prime(n))
    cout << 1 << "\n" << n;
  else {
    n = n - 3;
    long long p1, p2, p3;
    p1 = 3;
    long long i = 3;
    while (1) {
      if (prime(i)) {
        if ((n - i) == 0) {
          cout << 2 << "\n" << 3 << " " << i;
          break;
        }
        if (prime(n - i)) {
          cout << 3 << "\n" << 3 << " " << i << " " << n - i;
          break;
        }
      }
      i += 2;
    }
  }
  return 0;
}
