#include <bits/stdc++.h>
using namespace std;
mt19937_64 mt_rnd_64(chrono::steady_clock::now().time_since_epoch().count());
long long rnd(long long l, long long r) {
  return (mt_rnd_64() % (r - l + 1)) + l;
}
const int N = 1e5 + 5;
long long n, x;
bool prost(long long y) {
  if (y < 2) return false;
  for (int i = 2; i * i <= y; i++)
    if (y % i == 0) return 0;
  return 1;
}
int main() {
  cin >> n;
  if (n == 3) {
    cout << 1 << '\n' << 3;
    return 0;
  }
  x = n - 1;
  while (!prost(x)) x--;
  n -= x;
  for (int i = 2; i < n; i++) {
    if (prost(i) && prost(n - i)) {
      cout << 3 << '\n' << x << ' ' << i << ' ' << n - i;
      return 0;
    }
  }
  if (prost(n)) cout << 2 << '\n' << x << ' ' << n;
}
