#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int bok = 0;
  scanf("%d", &n);
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) bok = 1;
  }
  if (bok == 0) {
    printf("1\n");
    printf("%d", n);
    return 0;
  }
  bok = 0;
  for (int i = 2; i * i <= n - 2; i++) {
    if ((n - 2) % i == 0) bok = 1;
  }
  if (bok == 0) {
    printf("2\n");
    printf("2 %d", n - 2);
    return 0;
  }
  int i, j, k, kk;
  for (i = 3; i <= n / 3; i++) {
    int bok = 0;
    for (j = 2; j * j <= i; j++) {
      if (i % j == 0) {
        bok = 1;
        break;
      }
    }
    if (bok == 0) {
      for (k = n / 3; k < n; k++) {
        int book = 0;
        for (kk = 2; kk * kk <= k; kk++) {
          if (k % kk == 0) {
            book = 1;
            break;
          }
        }
        if (book == 0) {
          int bk = 0;
          for (int m = 2; m * m <= (n - i - k); m++) {
            if ((n - i - k) % m == 0) {
              bk = 1;
              break;
            }
          }
          if (bk == 0) {
            printf("3\n");
            printf("%d %d %d", i, k, (n - i - k));
            return 0;
          }
        }
      }
    }
  }
}
