#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
using bigint = long long int;
using vi = vector<int>;
using vll = vector<long long int>;
bool isPrime(int N) {
  for (int i = 2; i * i <= N; i++) {
    if (N % i == 0) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int N;
  cin >> N;
  if (isPrime(N)) {
    cout << 1 << "\n" << N << "\n";
    return 0;
  }
  int second = 0;
  for (int i = N - 2;; i -= 2) {
    if (isPrime(i)) {
      second = i;
      break;
    }
  }
  if (isPrime(N - second)) {
    cout << 2 << "\n";
    cout << N - second << " " << second << "\n";
    return 0;
  }
  int n = N - second;
  cout << 3 << "\n";
  cout << second << " ";
  for (int i = 2; i <= n / 2; i++) {
    if (isPrime(i) && isPrime(n - i)) {
      cout << i << " " << n - i << "\n";
      return 0;
    }
  }
  return 0;
}
