#include <bits/stdc++.h>
using namespace std;
int n, ans[5], cnt;
bool prime(int x) {
  if (x <= 1) return false;
  for (int i = 2; i <= sqrt(x); ++i)
    if (!(x % i)) return false;
  return true;
}
int main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  int k = n;
  while (k) {
    if (prime(k) && (n - k) > 2) {
      ans[++cnt] = k;
      break;
    }
    k--;
  }
  k = n - k;
  for (int i = 2; i <= k; ++i)
    if (prime(i)) {
      if (!(k - i)) {
        ans[++cnt] = i;
        break;
      }
      if (prime(k - i)) {
        ans[++cnt] = i;
        ans[++cnt] = k - i;
        break;
      }
    }
  cout << cnt << '\n';
  for (int i = 1; i <= cnt; ++i) cout << ans[i] << " ";
}
