#include <bits/stdc++.h>
using namespace std;
long long p(long long i) {
  if (i == 2) return 1;
  if (i == 0 || i == 1)
    return 0;
  else {
    long long f = 0;
    for (long long j = 2; j < sqrt(i) + 1; j++)
      if (i % j == 0) f = 1;
    if (f)
      return 0;
    else
      return 1;
  }
}
void f(long long n) {
  for (long long i = n; i >= n / 2; i--) {
    if (p(i) && p(n - i)) {
      cout << i << " " << (n - i);
      break;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  if (p(n))
    cout << "1" << '\n' << n;
  else if (p(n - 2))
    cout << "2" << '\n' << "2 " << (n - 2);
  else {
    cout << "3" << '\n';
    cout << "3 ";
    f(n - 3);
  }
}
