#include <bits/stdc++.h>
using namespace std;
bool isp(long long a) {
  if (a <= 1) return false;
  for (int i = 2; i * i <= a; i++) {
    if (a % i == 0) return false;
  }
  return true;
}
int main() {
  long long in = 27;
  cin >> in;
  vector<long long> re;
  if (isp(in)) {
    cout << 1 << endl;
    cout << in;
    return 0;
  }
  for (long long i = 2; i <= 1e6; i++) {
    long long left = in - i;
    if (isp(left)) {
      in -= left;
      re.push_back(left);
      break;
    }
  }
  if (isp(in)) {
    re.push_back(in);
  } else {
    for (long long i = 2; i <= in; i++) {
      if (isp(in - i) && isp(i)) {
        re.push_back(i);
        re.push_back(in - i);
        break;
      }
    }
  }
  cout << re.size() << endl;
  for (int i : re) {
    cout << i << " ";
  }
}
