#include <bits/stdc++.h>
using namespace std;
void pairsort(long long a[], long long b[], long long k) {
  pair<long long, long long> pairt[k];
  for (long long i = 0; i < k; i++) {
    pairt[i].first = a[i];
    pairt[i].second = b[i];
  }
  sort(pairt, pairt + k);
  for (long long i = 0; i < k; i++) {
    a[i] = pairt[i].first;
    b[i] = pairt[i].second;
  }
}
long long isprime(long long n) {
  if (n < 2) return 0;
  if (n < 4) return 1;
  if (n % 2 == 0 or n % 3 == 0) return 0;
  for (long long i = 5; i * i <= n; i += 6)
    if (n % i == 0 or n % (i + 2) == 0) return 0;
  return 1;
}
long long countdigit(long long n) { return floor(log10(n) + 1); }
long long C(long long n, long long r) {
  if (r > n - r) r = n - r;
  long long ans = 1;
  for (long long i = 1; i <= r; i++) {
    ans *= n - r + i;
    ans /= i;
  }
  return ans;
}
bool ispalind(string str) {
  size_t len = str.length();
  for (long long i = 0; i < len / 2; i++) {
    if (str[i] != str[len - 1 - i]) {
      return false;
    }
  }
  return true;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long MOD = 1000000;
long long func(long long k) {
  long long ans = 0;
  long long pow = 1;
  while (k > 0) {
    if (k % 10) {
      ans = (ans + pow * (k % 10));
      pow *= 10;
    }
    k /= 10;
  }
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  if (isprime(n))
    cout << 1 << endl << n;
  else if (isprime(n - 2))
    cout << 2 << endl << 2 << " " << n - 2;
  else {
    n = n - 3;
    for (long long i = n - 2; i >= 2; i--) {
      if (isprime(i) && isprime(n - i)) {
        cout << 3 << endl << 3 << " " << i << " " << (n - i);
        break;
      }
    }
  }
}
