#include <bits/stdc++.h>
using namespace std;
bool isprime(int n) {
  for (int i = (2); i < (sqrt(n) + 1); ++i)
    if (n % i == 0) return false;
  return true;
}
int main() {
  vector<int> ans;
  int h[400] = {0};
  for (int i = 4; i < 400; i += 2) h[i] = 1;
  h[2] = 0;
  h[1] = 1;
  for (int i = 3; i < 400; i += 2)
    if (!h[i]) {
      for (int j = i; j * i < 400; j += 2)
        if (!h[j * i]) h[j * i] = 1;
    }
  int n, sp, diff;
  scanf("%d", &n);
  if (n == 3) {
    printf("1\n3");
    return 0;
  }
  for (int i = (n - 1); i >= (2); --i)
    if (isprime(i)) {
      sp = i;
      break;
    }
  ans.push_back(sp);
  diff = n - sp;
  if (!h[diff])
    ans.push_back(diff);
  else {
    for (int i = (2); i < (diff); ++i)
      if (!h[i] && !h[diff - i]) {
        ans.push_back(i), ans.push_back(diff - i);
        break;
      }
  }
  printf("%d\n", ans.size());
  for (int i = (0); i < (ans.size()); ++i) printf("%d ", ans[i]);
  return 0;
}
