#include <bits/stdc++.h>
using namespace std;
template <class T>
void show(const vector<T> &a) {
  for (T x : a) cout << x << " ";
  cout << '\n';
}
const long long N = 2e5 + 100, oo = 1e18 + 500;
const long long mod = 998244353;
const long double eps = 1e-9, PI = 2 * acos(0.0);
long long n, m, k;
long long cnt = 0;
vector<long long> g[N];
vector<long long> visit(N, 0);
bool prime(long long v) {
  if (v < 2) return false;
  bool fl = true;
  for (long long j = 2; j * j <= v; j++) {
    if (v % j == 0) {
      fl = false;
      break;
    }
  }
  return fl;
}
signed main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cin >> n;
  if (prime(n)) {
    cout << 1 << '\n';
    cout << n << '\n';
    return 0;
  }
  long long dif;
  for (dif = 1; dif < n; dif++) {
    long long v = n - dif;
    if (prime(v)) {
      if (prime(dif)) {
        cout << 2 << '\n';
        cout << v << " " << dif << '\n';
        return 0;
      }
      for (long long j = 2; j <= dif; j++) {
        long long z = dif - j;
        if (prime(z) && prime(j)) {
          cout << 3 << '\n';
          cout << v << " " << z << " " << j << '\n';
          return 0;
        }
      }
    }
  }
}
