#include <bits/stdc++.h>
#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx")
using namespace std;
using ll = long long;
using ld = long double;
const ll MOD = 1e+9 + 7;
const ll INF = LLONG_MAX;
const int N = (int)2e+5 + 8;
bool isprime(ll n) {
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return false;
  }
  return true;
}
void MAIN(ll tc) {
  ll n;
  cin >> n;
  if (isprime(n)) {
    cout << 1 << endl;
    cout << n;
  } else {
    if (isprime(n - 2)) {
      cout << 2 << endl;
      cout << "2 " << n - 2;
    } else {
      cout << 3 << endl;
      cout << 3 << " ";
      for (int i = (n - 3) / 2; i >= 0; i--) {
        if (isprime(i)) {
          if (isprime(n - 3 - i)) {
            cout << i << " " << n - 3 - i;
            return;
          }
        }
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout << fixed;
  cout << setprecision(10);
  int test__cases = 1;
  for (int i = 1; i <= test__cases; i++) {
    MAIN(i);
  }
}
