#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX / 3;
const double EPS = 1e-14;
template <typename U, typename T>
void chmin(U &x, T y) {
  x = min(x, y);
}
template <typename U, typename T>
void chmax(U &x, T y) {
  x = max(x, y);
}
const long long int PRIMEMAX = 1e6;
long long int FACTOR[PRIMEMAX];
vector<long long int> Primes;
void sieve(long long int upb) {
  FACTOR[0] = FACTOR[1] = -1;
  for (long long int n = 2; n < upb; ++n) {
    if (FACTOR[n] != 0) continue;
    Primes.push_back(n);
    long long int kn = n * n;
    while (kn < PRIMEMAX) {
      FACTOR[kn] = n;
      kn += n;
    }
  }
}
bool is_prime(int n) {
  if (PRIMEMAX > n) {
    return FACTOR[n] == 0;
  } else {
    for (int p : Primes) {
      if (n % p == 0) return false;
    }
    return true;
  }
}
int main() {
  cout << fixed << setprecision(12);
  sieve(PRIMEMAX);
  int n;
  cin >> n;
  vector<int> ps;
  ps.push_back(n % 2 == 0 ? 2 : 3);
  n -= ps[0];
  if (n == 0) {
    cout << 1 << endl;
    cout << ps[0] << endl;
    return 0;
  }
  if (is_prime(n)) {
    cout << 2 << endl;
    cout << ps[0] << " " << n << endl;
    return 0;
  }
  for (int x : Primes) {
    int y = n - x;
    if (is_prime(y)) {
      ps.push_back(x);
      ps.push_back(y);
      break;
    }
  }
  cout << 3 << endl;
  for (int i = 0; i < (3); i++) {
    if (i > 0) cout << " ";
    cout << ps[i];
  }
  cout << endl;
  return 0;
}
