#include <bits/stdc++.h>
using namespace std;
const int mm = 100005;
bool pp(int x) {
  if (x <= 1) return false;
  if (x == 2 || x == 3) return true;
  for (long long int i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  if (n == 3 || n == 5 || n == 7) {
    cout << "1" << endl;
    cout << n << endl;
    return 0;
  }
  cout << "3" << endl;
  cout << "3 ";
  n -= 3;
  for (int i = 2; i < mm; i++) {
    if (pp(i) && pp(n - i)) {
      cout << i << " " << n - i << endl;
      return 0;
    }
  }
  return 0;
}
