#include <bits/stdc++.h>
using namespace std;
int isPrime(long long int x) {
  if (x == 1) return 0;
  if (x == 0) return 0;
  if (x == 2) return 1;
  if (x == 3) return 1;
  if (x == 4) return 0;
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
int main() {
  long long int n;
  cin >> n;
  if (isPrime(n)) {
    cout << 1 << endl << n;
    return 0;
  }
  int ps = -1;
  for (int i = n - 3, c = 0; c <= 400 and i >= 2; i--, c++) {
    if (isPrime(i)) {
      ps = i;
      break;
    }
  }
  vector<int> ans;
  ans.push_back(ps);
  n -= ps;
  if (isPrime(n)) {
    ans.push_back(n);
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); i++) {
      cout << ans[i] << " ";
    }
    cout << endl;
  } else {
    for (int i = n - 1, c = 0; c <= 400 and i >= 2; i--, c++) {
      if (isPrime(i) and isPrime(n - i)) {
        ans.push_back(i);
        ans.push_back(n - i);
        break;
      }
    }
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  }
}
