#include <bits/stdc++.h>
using namespace std;
int n, pt;
int sont(int x) {
  int i;
  if (x < 2) return 0;
  for (i = 2; i <= sqrt(x); i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
void solve() {
  int i, j, x;
  if (sont(n) == 1) {
    cout << "1\n" << n << endl;
    return;
  }
  x = n - 2;
  if (sont(x) == 1) {
    cout << "2\n" << 2 << " " << x << endl;
    return;
  }
  for (i = 3; i < sqrt(n); i = i + 2) {
    if (sont(i) == 1) {
      x = n - i;
      if (sont(x) == 1) {
        cout << "2\n" << i << " " << x << endl;
        return;
      }
      x /= 2;
      if (sont(x) == 1) {
        cout << "3\n" << i << " " << x << " " << x << endl;
        return;
      }
      x = n - 2 * i;
      if (sont(x) == 1) {
        cout << "3\n" << i << " " << i << " " << x << endl;
        return;
      }
      for (j = i + 2; j < sqrt(n); j = j + 2) {
        x = n - i - j;
        if (sont(x) == 1 && sont(j) == 1) {
          cout << "3\n" << i << " " << j << " " << x << endl;
          return;
        }
      }
    }
  }
}
void input() {
  while (cin >> n) {
    solve();
  }
}
int main() {
  input();
  return 0;
}
