#include <bits/stdc++.h>
using namespace std;
vector<int> primes;
set<int> set_primes;
bool sieve[1000005];
void fill() {
  for (int i = 0; i < 1000005; i++) {
    sieve[i] = true;
  }
  sieve[0] = false;
  sieve[1] = false;
  for (int i = 0; i < 1000005; i++) {
    if (!sieve[i]) continue;
    primes.push_back(i);
    set_primes.insert(i);
    for (int j = i; j < 1000005; j += i) {
      sieve[j] = false;
    }
  }
}
bool is_prime(int n) {
  if (n < 1000005) {
    if (set_primes.find(n) != set_primes.end())
      return true;
    else
      return false;
  }
  for (int i = 0; i < primes.size(); i++) {
    if (n % primes[i] == 0) return false;
  }
  return true;
}
int main(int argc, char const *argv[]) {
  fill();
  int n;
  cin >> n;
  if (n == 3) {
    cout << "1\n3" << endl;
    return 0;
  } else if (n == 5) {
    cout << "2\n2 3" << endl;
    return 0;
  }
  cout << 3 << endl;
  for (int p = 3; p <= n - 2; p += 2) {
    if (!is_prime(p)) continue;
    if (is_prime((n - p) / 2)) {
      cout << p << " " << (n - p) / 2 << " " << (n - p) / 2 << endl;
      break;
    }
  }
  return 0;
}
