#include <bits/stdc++.h>
using namespace std;
long long n;
vector<long long> pr;
int sost[21000];
bool isPrime(long long x) {
  bool prime = true;
  for (long long i = 2; i * i <= x; ++i) {
    if (x % i) continue;
    prime = false;
    break;
  }
  if (x < 2) prime = false;
  return prime;
}
int main() {
  ios::sync_with_stdio(0);
  sost[1] = 1;
  for (int i = 2; i < 21000; ++i) {
    if (sost[i]) continue;
    pr.push_back(i);
    for (int j = i + i; j < 21000; j += i) sost[j] = 1;
  }
  cin >> n;
  if (isPrime(n))
    cout << 1 << "\n" << n << "\n";
  else if (isPrime(n - 2))
    cout << 2 << "\n" << 2 << " " << n - 2 << "\n";
  else {
    for (int i = 0; i < pr.size(); ++i) {
      long long m = n - pr[i];
      if (m % 2) continue;
      m /= 2;
      if (isPrime(m)) {
        cout << 3 << "\n" << pr[i] << " " << m << " " << m << "\n";
        break;
      }
    }
  }
}
