#include <bits/stdc++.h>
using namespace std;
bool find(long long x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      return 0;
    }
  }
  return 1;
}
int main() {
  int n;
  scanf("%d", &n);
  if ((n % 2 != 0 && find(n) == 1) || n == 2) {
    printf("1\n%d\n", n);
  } else {
    if (n % 2 != 0) {
      printf("3\n3 ");
      n -= 3;
    } else {
      cout << 2 << endl;
    }
    n = (n >> 1);
    if (find(n) == 1)
      printf("%d %d\n", n, n);
    else {
      int tmp1, tmp2;
      if (n % 2 == 0) {
        tmp1 = n - 1;
        tmp2 = n + 1;
      } else {
        tmp1 = n - 2;
        tmp2 = n + 2;
      }
      while (1) {
        if (find(tmp1) == 1 && find(tmp2) == 1) {
          printf("%d %d\n", tmp1, tmp2);
          break;
        } else {
          tmp1 -= 2;
          tmp2 += 2;
        }
      }
    }
  }
  return 0;
}
