#include <bits/stdc++.h>
using namespace std;
const int MAX = 1000005;
const int MOD = 1e9 + 7;
bool check(int n) {
  if (n < 2) return false;
  int lim = sqrt(n);
  for (int i = 2; i <= lim; i++)
    if (n % i == 0) return false;
  return true;
}
int main() {
  int n;
  cin >> n;
  if (check(n)) {
    cout << "1" << endl;
    cout << n << endl;
  } else {
    if (check(n - 2)) {
      cout << "2" << endl;
      cout << "2 " << n - 2;
    } else {
      for (int i = n - 1; i >= n - 300; i--) {
        if (check(i)) {
          int left = n - i;
          for (int j = 2; j < left / 2; j++) {
            if (check(j) && check(left - j)) {
              cout << "3" << endl;
              cout << i << " " << j << " " << left - j;
              exit(0);
            }
          }
        }
      }
    }
  }
}
