#include <bits/stdc++.h>
using namespace std;
bool prime(int num) {
  if (num <= 1) return false;
  if (num == 2) return true;
  if (num % 2 == 0) return false;
  for (int i = 3; i * i <= num; i += 2) {
    if (num % i == 0) return false;
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  if (prime(n))
    cout << 1 << " " << n << endl;
  else if (prime(n - 2))
    cout << 2 << endl << 2 << " " << n - 2 << endl;
  else {
    n -= 3;
    for (int i = 3; i < n; i += 2) {
      if (prime(n - i) && prime(i))
        return cout << 3 << endl << 3 << " " << n - i << " " << i << endl, 0;
    }
  }
  return 0;
}
