#include <bits/stdc++.h>
using namespace std;
int isp(int n) {
  if (n == 2) return (1);
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return (0);
  }
  return (1);
}
int main() {
  int n;
  cin >> n;
  int x = n;
  while (isp(x) == 0) x--;
  if (x == n) {
    cout << 1 << endl;
    cout << n;
    return (0);
  }
  for (int i = 2; i <= n - x; i++) {
    for (int j = 2; j <= n - x; j++) {
      if (i == n - x) {
        if (isp(i)) {
          cout << 2 << endl;
          cout << i << " " << x;
          return (0);
        }
      }
      if (i + j == n - x) {
        if (isp(i) && isp(j)) {
          cout << 3 << endl;
          cout << i << " " << j << " " << x;
          return (0);
        }
      }
    }
  }
}
