#include <bits/stdc++.h>
using namespace std;
int seieve(int m) {
  for (int i = 3; i * i <= m; i += 2) {
    if (m % i == 0) {
      return 0;
    }
  }
  return 1;
}
int main() {
  long long int n, i, j, a, b;
  cin >> n;
  if (n == 5 || n == 3 || n == 7) {
    cout << 1 << endl;
    cout << n << endl;
  } else {
    n = n - 3;
    for (int j = 3; j <= n; j += 2) {
      a = j;
      b = n - j;
      if (seieve(a) && seieve(b)) {
        cout << 3 << endl;
        cout << 3 << " " << a << " " << b << endl;
        break;
      }
    }
  }
  return 0;
}
