#include <bits/stdc++.h>
using namespace std;
vector<int> primes;
void get_primes(int MAX) {
  bool visited[MAX + 10];
  memset(visited, 0, sizeof(visited));
  for (long long x = 2; x <= MAX; x++)
    if (!visited[x]) {
      primes.push_back(x);
      for (long long j = x * x; j <= MAX; j += x) visited[j] = true;
    }
}
inline bool check(int x) {
  for (int i = 0; primes[i] * primes[i] <= x; i++) {
    if (x % primes[i] == 0) return false;
  }
  return true;
}
int main() {
  int n;
  scanf("%d", &n);
  get_primes(100000);
  if (check(n)) {
    printf("1\n%d", n);
    return 0;
  }
  int cnt = 0;
  while (!check(n) || cnt < 4) {
    n--;
    cnt++;
  }
  printf("3\n%d ", n);
  for (int i = 0; i < primes.size(); i++) {
    if (check(cnt - primes[i])) {
      printf("%d %d", primes[i], cnt - primes[i]);
      return 0;
    }
  }
  return 0;
}
