#include <bits/stdc++.h>
using namespace std;
void setIO(const string& name = "") {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  if (name.length()) {
    freopen((name + ".in").c_str(), "r", stdin);
    freopen((name + ".out").c_str(), "w", stdout);
  }
}
bool isPrime(long long x) {
  if (x == 1) return false;
  for (long long i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      return false;
    }
  }
  return true;
}
long long n;
set<long long> primes;
signed main() {
  setIO();
  cin >> n;
  if (isPrime(n)) {
    cout << "1\n" << n << '\n';
    return 0;
  }
  if (isPrime(n - 2)) {
    cout << "2\n2 " << n - 2 << '\n';
    return 0;
  }
  for (auto(i) = 2; (i) < (300); (i)++) {
    if (isPrime(i)) primes.insert(i);
  }
  long long x = 1;
  n--;
  while (!isPrime(n)) {
    x++;
    n--;
  }
  assert(x % 2 == 0);
  assert(x < 300);
  for (auto&(c) : (primes)) {
    if (primes.count(x - c)) {
      cout << "3\n";
      cout << n << ' ' << c << ' ' << x - c << '\n';
      return 0;
    }
  }
  assert(false);
  return 0;
}
