#include <bits/stdc++.h>
using namespace std;
int i, j;
bool pri(int n) {
  if (n <= 1) return false;
  for (j = 2; j * j <= n; j++)
    if (n % j == 0) return false;
  return true;
}
int main() {
  int num, t;
  bool ok = 0;
  cin >> num;
  if (pri(num)) {
    cout << "1\n" << num << endl;
    return 0;
  }
  for (i = 3; i <= num; i += 2) {
    if (pri(i)) {
      int t = num - i;
      if (pri(t)) {
        cout << "2\n" << t << " " << i << endl;
        break;
      }
      for (int k = 3; k <= num; k += 2)
        if (pri(k) && pri(t - k)) {
          cout << "3\n" << i << " " << k << " " << (t - k) << endl;
          ok = 1;
          break;
        }
    }
    if (ok) break;
  }
  return 0;
}
