#include <bits/stdc++.h>
using namespace std;
float PHI = 1.6180339;
const float PI_F = 3.14159265358979f;
long long modpow(long long x, long long n, long long m) {
  if (n == 0) return 1 % m;
  long long u = modpow(x, n / 2, m);
  u = (u * u) % m;
  if (n % 2 == 1) u = (u * x) % m;
  return u;
}
long long add(long long x, long long y, long long m) {
  x += y;
  if (x >= m) return x - m;
  return x;
}
long long sub(long long x, long long y) {
  x -= y;
  if (x < 0) return x + 1000000007;
  return x;
}
long long inv(long long a, long long m = 998244353) {
  return modpow(a, m - 2, m);
}
long long mul(long long a, long long b, long long m) {
  return (long long)a * b % m;
}
long long nCrModp(long long n, long long r, long long p) {
  long long C[r + 1];
  memset(C, 0, sizeof(C));
  C[0] = 1;
  for (long long i = 1; i <= n; i++) {
    for (long long j = min(i, r); j > 0; j--) C[j] = (C[j] + C[j - 1]) % p;
  }
  return C[r];
}
bool sortinrev(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.first - a.second) > (b.first - b.second);
}
vector<long long> z_function(string &s) {
  long long n = s.size();
  vector<long long> z(n);
  for (long long i = 1, l = 0, r = 0; i < n; i++) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) z[i]++;
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
bool isprime(long long n) {
  if (n <= 1) return false;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
void SieveOfEratosthenes(long long n, bool isPrime[]) {
  isPrime[0] = isPrime[1] = false;
  for (long long i = 2; i <= n; i++) isPrime[i] = true;
  for (long long p = 2; p * p <= n; p++) {
    if (isPrime[p] == true) {
      for (long long i = p * p; i <= n; i += p) isPrime[i] = false;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  cout.tie();
  cout << fixed << setprecision(16);
  long long n;
  cin >> n;
  if (isprime(n)) {
    cout << "1"
         << "\n";
    cout << n << "\n";
    return 0;
  }
  long long maxn = 1e3;
  long long x = n;
  while (true) {
    if (isprime(x)) {
      break;
    }
    --x;
  }
  long long left = n - x;
  if (isprime(left)) {
    cout << "2"
         << "\n";
    cout << x << " " << left << "\n";
    return 0;
  }
  bool isPrime[maxn + 10];
  SieveOfEratosthenes(left, isPrime);
  long long f = 0, g = 0;
  for (long long i = 0; i < left; i++) {
    if (isPrime[i] && isPrime[left - i]) {
      f = i;
      g = left - i;
      break;
    }
  }
  cout << "3"
       << "\n";
  cout << x << " " << f << " " << g << "\n";
  return 0;
}
