#include <bits/stdc++.h>
using namespace std;
vector<int> a(100005), v;
void sieve() {
  a[0] = a[1] = 1;
  for (int i = 4; i < 100005; i += 2) a[i] = 1;
  for (int i = 3; i * i < 100005; i += 2) {
    if (!a[i]) {
      for (int j = i * i; j < 100005; j += 2 * i) a[j] = 1;
    }
  }
  for (long long i = 3LL; i < 100005; i += 2LL) {
    if (!a[i]) v.push_back(i);
  }
}
long long mulmod(long long a, long long b, long long m) {
  long long r = 0;
  a = a % m;
  while (b) {
    if (b & 1) r = (r + a) % m;
    a = (a * 2) % m;
    b = b >> 1;
  }
  return r;
}
long long modexp(long long x, long long n, long long m) {
  long long r = 1;
  while (n) {
    if (n & 1) r = mulmod(r, x, m);
    x = mulmod(x, x, m);
    n = n >> 1;
  }
  return r;
}
bool millerrabin(long long d, long long n) {
  long long a = 1 + rand() % (n - 1);
  long long x = modexp(a, d, n);
  if (x == 1 || x == n - 1) return true;
  while (d != n - 1 && x != n - 1) {
    x = mulmod(x, x, n);
    d *= 2;
  }
  if (x != n - 1) return false;
  return true;
}
bool isprime(long long n) {
  if (n == 2 || n == 3) return true;
  if (n <= 1 || (n & 1) == 0) return false;
  long long d = n - 1;
  while (d % 2 == 0) d >>= 1;
  for (int i = 0; i < 4; ++i) {
    if (!millerrabin(d, n)) return false;
  }
  return true;
}
void solve(long long n) {
  int l = v.size();
  for (int i = 0; i < l; ++i) {
    for (int j = i; j < l; ++j) {
      if (n < v[j]) break;
      if (isprime(n - v[j])) {
        cout << "2\n";
        cout << v[i] << " " << v[j];
        return;
      }
      if (n > v[i] + v[j] && isprime(n - v[i] - v[j])) {
        cout << "3\n";
        cout << v[i] << " " << v[j] << " " << n - v[i] - v[j];
        return;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  sieve();
  long long n;
  cin >> n;
  if (isprime(n)) {
    cout << 1 << "\n" << n;
    return 0;
  }
  if (isprime(n - 2)) {
    cout << 2 << "\n";
    cout << 2 << " " << n - 2;
    return 0;
  }
  if (isprime(n - 4)) {
    cout << 3 << "\n";
    cout << 2 << " " << 2 << " " << n - 4;
    return 0;
  }
  solve(n);
  return 0;
}
