#include <bits/stdc++.h>
using namespace std;
long long int check(long long int j) {
  long long int fl, i;
  for (i = 2; i <= sqrt(j); i++) {
    fl = 3;
    if (j % i == 0) {
      fl = 2;
      break;
    }
  }
  return fl;
}
int main() {
  long long int n, i, sqrtN, b, f, flag = -1, hand, res1, res, j;
  scanf("%I64d", &n);
  f = n;
  sqrtN = int(sqrt((double)n));
  for (i = 2; i <= sqrtN; i++) {
    if (n % i == 0) {
      flag = 1;
      break;
    }
  }
  hand = i;
  if (flag == 1) {
    b = n - i;
    res = check(b);
    if (res == 3) printf("2\n%I64d %I64d\n", hand, b);
    if (res != 3) {
      for (j = b - 1; j >= sqrtN; j--) {
        if (b - j != 1) res = check(j);
        if (res == 3) {
          if (b - j != 1) res1 = check(b - j);
          if (res1 == 3) {
            printf("3\n%I64d %I64d %I64d\n", hand, j, b - j);
            break;
          }
        }
      }
    }
  } else
    printf("1\n%I64d\n", f);
}
