#include <bits/stdc++.h>
using namespace std;
bool pd(int x) {
  for (int i = 2; i <= sqrt(x); i++)
    if (x % i == 0) return 0;
  return 1;
}
int main() {
  int n;
  cin >> n;
  int i, x1, x2, x3;
  if (pd(n)) {
    printf("1\n%d", n);
    return 0;
  }
  if (n & 1) {
    for (i = n - 2; i > 0; i--)
      if (pd(i)) {
        x1 = i;
        break;
      }
    n -= x1;
    if (n < 3) {
      printf("2\n%d 2", x1);
      return 0;
    }
    printf("3\n");
    for (i = n - 2; i > 0; i--)
      if (pd(i) && pd(n - i)) {
        x2 = i, x3 = n - i;
        printf("%d %d %d", x1, x2, x3);
        return 0;
      }
  } else {
    for (i = n - 3; i > 0; i--)
      if (pd(i) && pd(n - i)) {
        x1 = i, x2 = n - i;
        printf("2\n%d %d", x1, x2);
        return 0;
      }
  }
}
