#include <bits/stdc++.h>
using namespace std;
int n;
const int N = 100001;
vector<char> prime(N, true);
vector<int> p;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 2; i < N; i++) {
    if (prime[i]) {
      p.push_back(i);
      if (i * 1ll * i < N) {
        for (int j = i * i; j < N; j += i) {
          prime[j] = false;
        }
      }
    }
  }
  bool ok = true;
  for (auto u : p) {
    if (n == u) break;
    if (n % u == 0) {
      ok = false;
      break;
    }
  }
  if (ok) {
    cout << "1\n" << n << endl;
    exit(0);
  }
  vector<int> ans;
  if (n % 2 != 0) n -= 3, ans.push_back(3);
  for (auto v : p) {
    int t = n - v;
    bool ok2 = true;
    for (auto u : p) {
      if (u == t) break;
      if (t % u == 0) {
        ok2 = false;
        break;
      }
    }
    if (ok2) {
      ans.push_back(v);
      ans.push_back(t);
      break;
    }
  }
  cout << ans.size() << endl;
  for (auto u : ans) cout << u << ' ';
  return 0;
}
