#include <bits/stdc++.h>
using namespace std;
bool isPrime(long x) {
  if (x == 0 || x == 1) return false;
  for (auto i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
void findPrimes(long n) {
  if (isPrime(n)) {
    cout << "1" << endl;
    cout << n << endl;
  } else if (isPrime(n - 2)) {
    cout << "2" << endl;
    cout << 2 << " " << n - 2 << endl;
  } else {
    cout << "3" << endl;
    cout << 3 << " ";
    n = n - 3;
    for (auto i = 0; i < n; i++) {
      if (isPrime(i) && isPrime(n - i)) {
        cout << i << " " << (n - i);
        break;
      }
    }
  }
}
int main() {
  long n;
  cin >> n;
  findPrimes(n);
  return 0;
}
