#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using namespace std;
const ll inf = 2e18;
const ll mod = 1e9 + 7;
const ll N = 2e5 + 5;
int n;
int f(int n) {
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
void code() {
  cin >> n;
  int nxt = n;
  while (!f(nxt)) nxt--;
  if (nxt == n) {
    cout << 1 << "\n" << n << "\n";
    return;
  }
  vector<int> ans;
  ans.push_back(nxt);
  int left = n - nxt;
  vector<int> primes;
  for (int i = 2; i <= 300; i++) {
    if (f(i)) primes.push_back(i);
  }
  for (int i = 0; i < primes.size(); i++) {
    if (primes[i] == left) {
      ans.push_back(left);
      break;
    }
    for (int j = i; j < primes.size(); j++) {
      if (primes[i] + primes[j] == left) {
        ans.push_back(primes[i]);
        ans.push_back(primes[j]);
        goto tim;
      }
    }
  }
tim:;
  cout << ans.size() << "\n";
  for (auto i : ans) cout << i << " ";
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int t = 1;
  while (t-- > 0) {
    code();
  }
}
