#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;
}
int main() {
  long long int n;
  cin >> n;
  vector<long long int> ans;
  if (isPrime(n)) {
    ans.push_back(n);
  } else {
    if (isPrime(n - 2)) {
      ans.push_back(2);
      ans.push_back(n - 2);
    } else {
      n = n - 3;
      ans.push_back(3);
      for (long long int i = 2; i <= n; i++) {
        if (isPrime(i) && isPrime(n - i)) {
          ans.push_back(i);
          ans.push_back(n - i);
          break;
        }
      }
    }
  }
  cout << ans.size() << "\n";
  for (long long int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  cout << "\n";
}
