#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7, MAX = 1e6 + 5;
long long powN(long long a, long long p) {
  if (p == 0) return 1;
  long long z = powN(a, p / 2);
  z = (z * z) % MOD;
  if (p % 2) z = (z * a) % MOD;
  return z;
}
vector<bool> is_prime(MAX + 1, true);
void Sieve() {
  is_prime[0] = is_prime[1] = false;
  int i, j;
  for (i = 2; i * i <= MAX; i++) {
    if (is_prime[i]) {
      for (j = i * i; j <= MAX; j += i) is_prime[j] = false;
    }
  }
}
bool prime(int x) {
  if (x == 0) return true;
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  int x, y = 0, z = 0;
  for (int i = n; i >= 0; i--) {
    if (prime(i)) {
      x = i;
      break;
    }
  }
  n -= x;
  for (int i = 2; i <= n; i++) {
    if (prime(i) && prime(n - i)) {
      y = i;
      z = n - i;
      break;
    }
  }
  if (y == 0 && z == 0) {
    cout << 1 << endl;
    cout << x << endl;
  } else if (z == 0) {
    cout << 2 << endl;
    cout << x << " " << y << endl;
  } else if (y == 0) {
    cout << 2 << endl;
    cout << x << " " << z << endl;
  } else {
    cout << 3 << endl;
    cout << x << " " << y << " " << z << endl;
  }
}
