#include <bits/stdc++.h>
using namespace std;
bool isPrime(int num) {
  for (int i = 2; i <= sqrt(num) + 1; ++i) {
    if (num % i == 0) return false;
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  if (n < 9) {
    cout << 1 << endl;
    cout << n << endl;
  } else if (n == 9) {
    cout << 3 << endl;
    cout << 3 << ' ' << 3 << ' ' << 3 << endl;
  } else if (n == 11) {
    cout << 3 << endl;
    cout << 3 << ' ' << 3 << ' ' << 5 << endl;
  } else {
    cout << 3 << endl;
    n -= 3;
    for (int i = 3; i <= n / 2; ++i) {
      if (isPrime(i) && isPrime(n - i)) {
        cout << 3 << ' ' << i << ' ' << n - i << endl;
        break;
      }
    }
  }
  return 0;
}
