#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long int n) {
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
void solve() {
  long long int n;
  cin >> n;
  long long int x;
  x = n;
  if (isPrime(x)) {
    cout << 1 << "\n";
    cout << x << "\n";
  } else {
    while (x--) {
      if (isPrime(x)) {
        long long int l = n - x;
        for (long long int i = 2; i <= l; i++) {
          if (isPrime(i) && isPrime(l - i)) {
            if (l - i == 0) {
              cout << 2 << "\n";
              cout << x << " " << i << "\n";
              return;
            } else {
              cout << 3 << "\n";
              cout << x << " " << i << " " << l - i << "\n";
              return;
            }
          }
        }
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t, q;
  q = 1;
  for (t = 1; t <= q; t++) {
    solve();
  }
}
