#include <bits/stdc++.h>
using namespace std;
void __print(long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  long long f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long long N = 1e6 + 1;
vector<long long> SPF(N), primes;
void spf() {
  for (long long i = 1; i <= 1e6; i++) SPF[i] = i;
  for (long long i = 2; i * i <= 1e6; i++) {
    for (long long j = i * i; j <= 1e6; j += i) {
      if (SPF[j] == j) SPF[j] = i;
    }
  }
  for (long long i = 2; i <= 1e6; i++) {
    if (SPF[i] == i) primes.push_back(i);
  }
  return;
}
bool prime(long long n) {
  if (n == 1) return false;
  if (n == 2 || n == 3) return true;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
void solve() {
  long long n;
  cin >> n;
  if (prime(n))
    cout << 1 << "\n" << n;
  else if (prime(n - 2))
    cout << 2 << "\n"
         << "2 " << n - 2;
  else {
    cout << 3 << "\n";
    n -= 3;
    cout << 3 << " ";
    for (auto i : primes) {
      if (prime(n - i)) {
        cout << i << " " << n - i << "\n";
        return;
      }
    }
  }
}
signed main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  spf();
  { solve(); }
  return 0;
}
