#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long inf = 1e18;
long long m_inf = INT_MIN;
bool isPrime(long long n) {
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  std::cout.unsetf(std::ios::fixed);
  std::cout.precision(9);
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    if (isPrime(n)) {
      cout << 1 << '\n' << n << '\n';
      continue;
    }
    long long temp = n;
    vector<long long> ans;
    while (!isPrime(temp)) temp--;
    ans.push_back(temp);
    n -= temp;
    if (n == 2) {
      ans.push_back(2);
    } else {
      for (long long i = 2; i < n + 1; i++) {
        if (isPrime(i) && isPrime(n - i)) {
          ans.push_back(i);
          ans.push_back(n - i);
          break;
        }
      }
    }
    cout << ans.size() << '\n';
    for (long long i = 0; i < ans.size(); i++) {
      cout << ans[i] << ' ';
    }
    cout << '\n';
  }
}
