#include <bits/stdc++.h>
using namespace std;
int n, i, p = 0, k, r1, r2, r3;
int main() {
  cin >> n;
  for (k = 2; k * k <= n; k++) {
    if (n % k == 0) {
      p = 1;
    }
  }
  if (p == 0) {
    cout << "1" << endl << n;
    return 0;
  }
  p = 0;
  for (i = n - 2; i > 2; i--) {
    for (k = 2; k * k <= i; k++) {
      if (i % k == 0) {
        p = 1;
      }
    }
    if (p == 0) {
      r1 = i;
      break;
    }
    p = 0;
  }
  n -= r1;
  if (n == 2) {
    cout << "2" << endl << r1 << " 2";
  }
  if (n == 4) {
    cout << "3" << endl << r1 << " 2 2";
  }
  for (r2 = 3; r2 <= n / 2; r2++) {
    for (k = 2; k * k <= r2; k++) {
      if (r2 % k == 0) {
        p = 1;
      }
    }
    if (p == 0) {
      for (k = 2; k * k <= n - r2; k++) {
        if ((n - r2) % k == 0) {
          p = 1;
        }
      }
      if (p == 0) {
        cout << "3" << endl << r1 << " " << r2 << " " << n - r2;
        return 0;
      }
    }
    p = 0;
  }
}
