#include <bits/stdc++.h>
using namespace std;
bool isPrime(int num) {
  if (num == 1)
    return false;
  else {
    for (int i = 2; i * i <= num; i++)
      if (num % i == 0) return false;
    return true;
  }
}
int main() {
  ios::sync_with_stdio(false);
  int n, prime = 0;
  cin >> n;
  if (isPrime(n) == true) {
    cout << "1\n" << n << "\n";
    return (0);
  }
  for (int i = n - 2; i >= 2; i--) {
    if (isPrime(i) == true) {
      prime = i;
      break;
    }
  }
  if (isPrime(n - prime))
    cout << "2\n" << prime << " " << n - prime << "\n";
  else {
    for (int i = 1; n - prime - i >= 2; i++) {
      if (isPrime(i) == true && isPrime(n - prime - i) == true) {
        cout << "3\n" << i << " " << n - prime - i << " ";
        break;
      }
    }
    cout << prime << "\n";
  }
  return (0);
}
