#include <bits/stdc++.h>
using namespace std;
int n;
int a[100005];
vector<int> yo;
int p, q, r, sy;
void sieve() {
  int ns = 100001;
  for (int i = 2; i < ns; i++) {
    if (!a[i]) {
      for (int j = i * 2; j < ns; j += i) {
        a[j] = 1;
      }
    }
  }
  for (int i = 2; i < ns; i++) {
    if (!a[i]) yo.push_back(i);
  }
}
int is_prime(int x) {
  if (x == 1) return 0;
  if (x < 100001) return (1 - a[x]);
  for (int y = 0; y < sy; y++) {
    if (x % yo[y] == 0) return 0;
  }
  return 1;
}
int main() {
  cin >> n;
  sieve();
  sy = yo.size();
  if (n == 3 || n == 5)
    cout << 1 << endl << n;
  else {
    int ck = 1;
    while (1) {
      r = yo[ck];
      for (int i = 0; i < 31; i++) {
        p = yo[i];
        q = n - p - r;
        if (is_prime(q)) {
          cout << 3 << endl << r << " " << p << " " << q;
          return 0;
        }
      }
      ck++;
    }
  }
  return 0;
}
