#include <bits/stdc++.h>
using namespace std;
int n, acc;
vector<int> ans;
bool is_prime(int x) {
  if (x <= 1) return 0;
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie();
  cin >> n;
  for (int i = 0; i <= n; i++) {
    if (is_prime(n - i) && i != 1) {
      ans.push_back(n - i);
      acc = i;
      break;
    }
  }
  for (int i = 0; i < acc; i++) {
    int lol = 0;
    lol += is_prime(acc - i);
    lol += is_prime(i);
    if (lol > 1) {
      ans.push_back(i);
      ans.push_back(acc - i);
      break;
    }
    if (lol == 1 && (i == 0 ^ acc - i == 0)) {
      ans.push_back(((i == 0) ? acc - i : i));
      break;
    }
  }
  cout << ans.size() << "\n";
  for (auto u : ans) cout << u << " ";
  return 0;
}
