#include <bits/stdc++.h>
const int inf = 1e9 + 5;
const long long linf = 1e18;
const long double eps = 1e-6;
const long long mod = 1e9 + 7;
const int maxn = 2e5 + 10;
using namespace std;
bool prost(int x) {
  if (x == 1) return 0;
  for (int i = 2; i * i <= x; i++)
    if (!(x % i)) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  int x;
  cin >> x;
  int i;
  for (i = x; i > 0; i -= 2)
    if (prost(i)) {
      if (i == x) {
        cout << 1 << "\n" << x;
        exit(0);
      }
      if (prost(x - i)) {
        cout << 2 << "\n" << x - i << ' ' << i;
        exit(0);
      }
      break;
    }
  x -= i;
  for (int j = x; j >= 2; j--) {
    if (prost(j)) {
      if (prost(x - j)) {
        cout << 3 << "\n";
        cout << i << ' ' << j << ' ' << x - j;
        exit(0);
      }
    }
  }
  return 0;
}
