#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long N = 300005;
const long long inf = 10000000000000000;
const double PI = 3.141592653589793238462;
void print(vector<long long> v) {
  long long i;
  for (i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << "\n";
}
void print(vector<pair<long long, long long> > v) {
  long long i;
  for (i = 0; i < v.size(); i++) {
    cout << v[i].first << " " << v[i].second << "\n";
  }
}
vector<long long> read(long long n) {
  long long i;
  vector<long long> arr(n, 0);
  for (i = 0; i < n; i++) cin >> arr[i];
  return arr;
}
vector<long long> read(long long n, long long k) {
  long long i;
  vector<long long> arr(n + k, 0);
  for (i = k; i < n + k; i++) cin >> arr[i];
  return arr;
}
void size(long long byte) {
  double bytes = byte;
  double KB = bytes / 1024;
  double MB = KB / 1024;
  cout << fixed << setprecision(2) << "bytes: " << bytes << "\n";
  cout << fixed << setprecision(2) << "KB: " << KB << "\n";
  cout << fixed << setprecision(2) << "MB: " << MB << "\n";
}
bool isEven(long long n) { return n % 2 == 0; }
bool isOdd(long long n) { return n % 2 != 0; }
bool isPrime(long long n) {
  if (n % 2 == 0) return 0;
  if (n <= 1) return 0;
  for (int i = 3; i * i <= n; i += 2) {
    if (n % i == 0) return 0;
  }
  return 1;
}
void solve() {
  long long t = 1, cs = 1;
  while (t--) {
    long long i, j, k, n, m, p, q, x, y, a, b, l, r;
    cin >> n;
    if (isPrime(n)) {
      cout << 1 << "\n" << n << "\n";
    } else if (isPrime(n - 2)) {
      cout << 2 << "\n" << 2 << " " << n - 2 << "\n";
    } else {
      cout << 3 << "\n";
      cout << 3 << " ";
      for (i = 1; i <= n - 3; i++) {
        if (isPrime(i) && isPrime(n - 3 - i)) {
          cout << i << " " << n - 3 - i << "\n";
          break;
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
