#include <bits/stdc++.h>
using namespace std;
bool prime(int n) {
  if (n < 2) return 0;
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (int i = 3; i * i <= n; i += 2)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> res;
  int tmp = n;
  while (!prime(tmp)) tmp--;
  res.push_back(tmp);
  n -= tmp;
  if (prime(n)) {
    res.push_back(n);
    n = 0;
  }
  for (int i = 0; i <= n; ++i) {
    if (prime(i) && prime(n - i)) {
      res.push_back(i);
      res.push_back(n - i);
      break;
    }
  }
  cout << res.size() << '\n';
  for (int i = 0; i < res.size(); ++i) cout << res[i] << " ";
  cout << '\n';
  return 0;
}
