#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int prim[maxn];
bool vis[maxn];
int cnt;
void init() {
  for (int i = 2; i < maxn; i++)
    if (!vis[i]) {
      prim[cnt++] = i;
      for (int j = i + i; j < maxn; j += i) vis[j] = 1;
    }
}
bool isprime(int x) {
  if (x <= 1) return 0;
  for (int i = 0; i < cnt && prim[i] * prim[i] <= x; i++) {
    if (x % prim[i] == 0) return 0;
  }
  return 1;
}
bool ok(long long x) {
  if (x < maxn && !vis[x]) {
    cout << 1 << endl << x << endl;
    return 1;
  }
  for (int i = 1; i < 5000; i++) {
    if (prim[i] < x && isprime(x - prim[i])) {
      cout << 2 << endl;
      cout << prim[i] << " " << x - prim[i] << endl;
      return 1;
    }
    for (int j = i; j < 5000; j++) {
      long long y = prim[i] + prim[j];
      if (y == x) {
        cout << 2 << endl << prim[i] << " " << prim[j] << endl;
        return 1;
      }
      if (y + 2 > x) continue;
      if (isprime(x - y)) {
        cout << 3 << endl;
        cout << prim[i] << " " << prim[j] << " " << x - y << endl;
        return 1;
      }
    }
  }
  cout << -1 << endl;
  return 0;
}
int main() {
  init();
  int n;
  while (cin >> n) {
    if (n == 3)
      cout << 1 << endl << 3 << endl;
    else if (n == 4)
      cout << 2 << endl << "2 2" << endl;
    else if (n == 5)
      cout << 1 << endl << "5" << endl;
    else if (n == 6)
      cout << 2 << endl << "3 3" << endl;
    else if (n == 7)
      cout << 1 << endl << 7 << endl;
    else
      ok(n);
  }
  return 0;
}
