#include <bits/stdc++.h>
using namespace std;
template <typename T>
T prod(const T &a, const T &b, const T &mod) {
  return ((a % mod) * (b % mod)) % mod;
}
template <typename T>
T pow_(const T &a, const T &b) {
  if (!b) return 1;
  T p = pow_(a, b / 2);
  p *= p;
  return (b % 2) ? (p * a) : p;
}
template <typename T>
T modpow(const T &a, const T &b, const T &mod) {
  if (!b) return 1;
  T p = modpow(a, b / 2);
  p = prod(p, p);
  return (b % 2) ? (prod(p, a)) : p;
}
template <typename T>
T max(const T &a, const T &b, const T &c) {
  return max(a, max(b, c));
}
template <typename T>
T min(const T &a, const T &b, const T &c) {
  return min(a, min(b, c));
}
template <typename T>
void dbg(const vector<T> &a, int l, int r) {
  for (long long int i = l; i <= r; i++) cout << a[i] << " ";
  cout << endl;
}
template <typename T>
void dbg(const vector<T> &a) {
  for (long long int i = 0; i <= a.size() - 1; i++) cout << a[i] << " ";
  cout << endl;
}
bool prime(long long int n) {
  if (n == 1) return false;
  if (n == 2) return true;
  if (n % 2 == 0) return false;
  for (long long int i = 3; i <= sqrt(n); i += 2)
    if (n % i == 0) return false;
  return true;
}
void main_() {
  long long int n;
  cin >> n;
  long long int p = n;
  if (prime(n)) {
    cout << "1\n";
    cout << n << endl;
    return;
  }
  while (p >= 3) {
    if (prime(p) && (n - p) > 1) break;
    p--;
  }
  long long int num = n - p;
  if (prime(n - p)) {
    cout << "2\n";
    cout << p << " " << n - p << endl;
    return;
  }
  cout << "3\n";
  cout << p << " ";
  for (long long int i = 2; i <= num; i++) {
    for (long long int j = 2; j <= num; j++) {
      if (prime(i) && prime(j)) {
        if (i + j == num) {
          cout << i << " " << j << endl;
          return;
        }
      }
    }
  }
}
int main() {
  { main_(); }
  return 0;
}
