#include <bits/stdc++.h>
using namespace std;
int prime(int number) {
  if (number == 1) {
    return 0;
  } else if (number == 2) {
    return 1;
  } else if (number % 2 == 0) {
    return 0;
  } else {
    for (int i = 3; i * i <= number; i += 2) {
      if (number % i == 0) {
        return 0;
      }
    }
    return 1;
  }
}
int main() {
  int n;
  cin >> n;
  if (n <= 5) {
    cout << 1 << endl << n;
  } else {
    cout << 3 << endl << 3 << ' ';
    n -= 3;
    for (int i = 2; i <= n - i; i++) {
      if (prime(i) && prime(n - i)) {
        cout << i << ' ' << n - i;
        break;
      }
    }
  }
  return 0;
}
