#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long modularExp(long long x, long long n, long long mod) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % mod;
    x = ((x % mod) * (x % mod)) % mod;
    n = n / 2;
  }
  return (result) % mod;
}
bool isPrime(long long n) {
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
int main() {
  long long n;
  cin >> n;
  if (isPrime(n)) {
    cout << "1\n";
    cout << n;
    return 0;
  }
  vector<long long> ans;
  ans.push_back(3);
  n = n - 3;
  long long i = n - 3;
  while (1) {
    if (isPrime(i) && isPrime(n - i)) break;
    i = i - 2;
  }
  cout << "3\n";
  cout << "3 " << i << " " << n - i;
}
