#include <bits/stdc++.h>
using namespace std;
int prime[5000000 + 100];
void eratos() {
  for (int i = 0; i < 5000000; i++) prime[i] = 1;
  prime[0] = prime[1] = 0;
  for (int i = 2; i * i <= 5000000; i++)
    if (prime[i]) {
      for (int j = i * 2; j <= 5000000; j += i) prime[j] = 0;
    }
  return;
}
bool isprime(int x) {
  if (x <= 5000000) return prime[x];
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
int n;
int main() {
  eratos();
  scanf("%d", &n);
  if (n == 3 || n == 5) {
    printf("1\n%d\n", n);
    return 0;
  }
  n -= 3;
  vector<int> v;
  for (int i = 2; i <= 5000000; i++)
    if (prime[i]) v.push_back(i);
  bool flag = true;
  for (int i = 0; i < v.size(); i++) {
    if (v[i] >= n) break;
    if (isprime(n - v[i])) {
      flag = false;
      printf("3\n3 %d %d\n", v[i], n - v[i]);
      break;
    }
  }
  return 0;
}
