#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
int n, i, a, b;
int isprime(int x) {
  int i;
  for (i = 2; i <= sqrt(x); i++)
    if (x % i == 0) return 0;
  return 1;
}
int main() {
  scanf("%d", &n);
  if (isprime(n)) return cout << 1 << endl << n, 0;
  for (i = n; i >= 3; i--)
    if (n - i >= 2 and isprime(i)) break;
  a = i;
  n -= i;
  if (isprime(n)) return cout << 2 << endl << a << ' ' << n, 0;
  for (i = n - 2; i >= 2; i--)
    if (isprime(i) and isprime(n - i))
      return cout << 3 << endl << a << ' ' << i << ' ' << n - i, 0;
}
