#include <bits/stdc++.h>
using namespace std;
bool prime(long long x) {
  for (long long i = sqrt(double(x)); i >= 2; i--) {
    if (x % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  long long t, x, m = 0;
  cin >> t;
  m = 0;
  for (long long i = t - 2; i >= 2; i--) {
    if (prime(i) == 1) {
      x = i;
      break;
    }
  }
  if (prime(t) == 1) {
    cout << 1 << endl << t << endl;
  } else if (t % 2 == 0) {
    cout << 2 << endl << x << " " << t - x << endl;
  } else {
    m = 0;
    for (long long i = t - 7; i >= 2; i--) {
      if (prime(i) == 1) {
        x = i;
        if (prime(t - 5 - x) == 1) break;
      }
    }
    cout << 3 << endl << 5 << " ";
    cout << x << " " << t - x - 5 << endl;
  }
}
