#include <bits/stdc++.h>
using namespace std;
long long prost(long long n) {
  for (long long i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}
signed main() {
  long long n;
  cin >> n;
  if (n == 3) {
    cout << 1 << endl << 3;
    return 0;
  }
  if (n == 4) {
    cout << 2 << endl << 2 << ' ' << 2;
    return 0;
  }
  if (n == 5) {
    cout << 2 << endl << 3 << ' ' << 2;
    return 0;
  }
  long long fx = 0;
  for (long long i = n - 1;; i--) {
    if (prost(i)) {
      for (long long j = 2;; j++) {
        if (prost(j) and i > 1 and n - i - j > 1 and prost(n - i - j)) {
          cout << 3 << endl;
          cout << i << ' ' << j << ' ' << n - i - j;
          return 0;
        } else if (prost(j) and i > 1 and n - i - j == 0) {
          cout << 2 << endl;
          cout << j << ' ' << i << endl;
          return 0;
        }
      }
    }
  }
}
