#include <bits/stdc++.h>
using namespace std;
bool is_prime(int n) {
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
void solve(int n) {
  if (n == 3 || n == 5 || n == 7) {
    cout << 1 << endl << n << endl;
    return;
  }
  cout << 3 << endl << 3;
  n -= 3;
  for (int i = 3; i + i <= n; i += 2)
    if (is_prime(i) && is_prime(n - i)) {
      cout << ' ' << i << ' ' << n - i << endl;
      return;
    }
  assert(0);
}
int main() {
  for (int n; cin >> n && n;) solve(n);
}
