#include <bits/stdc++.h>
using namespace std;
bool isp(long long x) {
  long long flag = 1;
  for (long long i = 2; i <= sqrt(x); ++i) {
    if (x % i == 0) flag = 0;
  }
  return flag;
}
int main() {
  std::ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  if (isp(n)) {
    cout << 1 << "\n";
    cout << n;
    return 0;
  }
  if (isp(n - 2)) {
    cout << 2 << "\n";
    cout << 2 << " " << n - 2;
    return 0;
  }
  n = n - 3;
  long long x1 = n / 2, x2 = x1;
  while (1) {
    x1--, x2++;
    if (isp(x1) && isp(x2)) {
      break;
    }
  }
  cout << 3 << "\n";
  cout << 3 << " " << x1 << " " << x2;
}
