#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long prime[N];
vector<long long> v, ans;
bool isprime(long long n) {
  if (n == 1) return false;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
void pre() {
  prime[1] = 1;
  for (long long i = 2; i < N; i++) {
    if (!prime[i]) {
      v.push_back(i);
      for (long long j = 2; i * j < N; j++) prime[i * j] = 1;
    }
  }
}
void get(long long n) {
  for (long long i = 0; i < v.size(); i++) {
    if (n - v[i] >= 0 && isprime(n - v[i])) {
      ans.push_back(v[i]);
      if (n - v[i] > 0) ans.push_back(n - v[i]);
      return;
    }
  }
}
void solve() {
  pre();
  long long n;
  cin >> n;
  if (n & 1) {
    ans.push_back(3);
    n -= 3;
  }
  get(n);
  cout << ans.size() << "\n";
  for (auto it : ans) cout << it << " ";
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
