#include <bits/stdc++.h>
using namespace std;
static const int MAX_NUM = 1000000;
bool check_prime(int n, const vector<int>& primes) {
  int num_primes = primes.size();
  for (int i = 0; i < num_primes && primes[i] * primes[i] <= n; ++i) {
    if (n % primes[i] == 0) {
      return false;
    }
  }
  return true;
}
int main(int argc, const char* argv[]) {
  int n;
  cin >> n;
  vector<int> primes;
  vector<bool> is_prime(MAX_NUM, true);
  is_prime[0] = false;
  is_prime[1] = false;
  is_prime[2] = true;
  primes.emplace_back(2);
  int i;
  for (i = 3; i * i < MAX_NUM; i += 2) {
    if (is_prime[i]) {
      primes.emplace_back(i);
      for (int j = i * i; j < MAX_NUM; j += i) {
        is_prime[j] = false;
      }
    }
  }
  for (; i < MAX_NUM; i += 2) {
    if (is_prime[i]) {
      primes.emplace_back(i);
    }
  }
  if (check_prime(n, primes)) {
    cout << 1 << endl << n << endl;
  } else if (check_prime(n - 2, primes)) {
    cout << 2 << endl << 2 << " " << (n - 2) << endl;
  } else {
    if (check_prime(n - 4, primes)) {
      cout << 3 << endl << 2 << " " << 2 << " " << (n - 4) << endl;
    } else {
      int p3;
      for (p3 = n - 6;; p3 -= 2) {
        if (check_prime(p3, primes)) {
          break;
        }
      }
      int diff = n - p3;
      bool is_end = false;
      for (int p1 = 3; !is_end; p1 += 2) {
        if (!check_prime(p1, primes)) {
          continue;
        }
        int p2 = diff - p1;
        if (!check_prime(p2, primes)) {
          continue;
        }
        cout << 3 << endl << p1 << " " << p2 << " " << p3 << endl;
        is_end = true;
      }
    }
  }
  return 0;
}
