#include <bits/stdc++.h>
using namespace std;
inline bool Prime(int x) {
  int n = sqrt(x);
  for (int i = 2; i <= n; i++) {
    if (x % i == 0) {
      return 0;
    }
  }
  return 1;
}
inline void Solve(int x, int &a, int &b) {
  for (int i = 2; i <= x / 2; i++) {
    if (Prime(i) && Prime(x - i)) {
      a = i;
      b = x - i;
      return;
    }
  }
}
int main() {
  int n, a, b;
  cin >> n;
  if (n < 7) {
    if (n == 3) cout << 1 << "\n" << 3;
    if (n == 4) cout << 2 << "\n" << 2 << " " << 2;
    if (n == 5) cout << 1 << "\n" << 5;
    if (n == 6) cout << 2 << "\n" << 2 << " " << 3;
    return 0;
  }
  cout << 3 << "\n";
  if (n % 2 != 0) {
    Solve(n - 3, a, b);
    cout << 3 << " " << a << " " << b;
  } else {
    Solve(n - 2, a, b);
    cout << 2 << " " << a << " " << b;
  }
  return 0;
}
