#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e7 + 6, inf = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  bool flg = 1;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      flg = 0;
      break;
    }
  }
  if (flg) cout << "1\n" << n << "\n", exit(0);
  if (n % 2 == 0) {
    cout << "2\n";
    for (int i = 2; i <= n; i++) {
      bool flg = 1, flg2 = 1;
      for (int j = 2; j * j <= i; j++) {
        if (i % j == 0) {
          flg = 0;
          break;
        }
      }
      for (int j = 2; j * j <= n - i; j++) {
        if ((n - i) % j == 0) {
          flg2 = 0;
          break;
        }
      }
      if (flg && flg2 && i != 1 && (n - i) != 1)
        cout << i << " " << n - i << "\n", exit(0);
    }
  } else {
    cout << "3\n";
    int first;
    for (int i = 3; i <= n; i++) {
      bool flg = 1;
      for (int j = 2; j * j <= i; j++) {
        if (i % j == 0) {
          flg = 0;
          break;
        }
      }
      if (flg) {
        first = i;
        break;
      }
    }
    for (int i = 3; i <= n - first; i++) {
      bool flg = 1, flg2 = 1;
      for (int j = 2; j * j <= i; j++) {
        if (i % j == 0) {
          flg = 0;
          break;
        }
      }
      for (int j = 2; j * j <= n - i - first; j++) {
        if ((n - i - first) % j == 0) {
          flg2 = 0;
          break;
        }
      }
      if (flg && flg2 && (n - first - i) != 1)
        cout << i << " " << n - i - first << " " << first << "\n", exit(0);
    }
  }
  return 0;
}
