#include <bits/stdc++.h>
using namespace std;
const int MAX_N = (int)1e3 + 1;
set<long long> sieve;
long long pf[MAX_N];
void construct_sieve() {
  for (int i = 0; i < MAX_N; i++) pf[i] = i;
  for (int i = 2; i * i < MAX_N; i++) {
    if (pf[i] == i) {
      for (int j = 2; j * i < MAX_N; j++)
        if (pf[i * j] == i * j) pf[i * j] = i;
    }
  }
  for (int i = 2; i < MAX_N; i++)
    if (pf[i] == i) sieve.insert(1LL * i);
}
bool isPrime(long long n) {
  if (n <= 1)
    return false;
  else if (n == 2 || n == 3)
    return true;
  else if (n % 2 == 0)
    return false;
  else {
    for (int i = 3; i * i <= n; i += 2)
      if (n % i == 0) return false;
  }
  return true;
}
vector<long long> check(long long n) {
  vector<long long> ans;
  if (sieve.find(n) != sieve.end()) {
    ans.push_back(n);
    return ans;
  } else {
    for (long long x : sieve) {
      for (long long y : sieve) {
        if (x + y == n) {
          ans.push_back(x);
          ans.push_back(y);
          return ans;
        }
      }
    }
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  construct_sieve();
  long long n;
  cin >> n;
  if (isPrime(n)) {
    cout << "1\n" << n << "\n";
    return 0;
  }
  vector<long long> ans;
  int cnt = 2;
  for (long long i = n; i >= 2; i -= (i == 3 ? 1 : 2)) {
    if (n == 0) break;
    vector<long long> aRes = check(n - i);
    int tmp = aRes.size();
    if (isPrime(i) && tmp >= 1 && tmp <= 2) {
      n = n - i;
      ans.push_back(i);
      for (long long c : aRes) ans.push_back(c);
      break;
    }
  }
  sort(ans.begin(), ans.end());
  cout << ans.size() << "\n";
  for (long long x : ans) cout << x << " ";
  cout << "\n";
  return 0;
}
