#include <bits/stdc++.h>
using namespace std;
bool isprime(long long x) {
  if (x == 1) return false;
  if (x == 2)
    return true;
  else {
    if (x % 2 == 0)
      return false;
    else {
      for (long long i = 3; i * i <= x; i += 2) {
        if ((x % i) == 0) return false;
      }
      return true;
    }
  }
}
int main() {
  long long i;
  cin >> i;
  if (i > 4) {
    if (isprime(i)) {
      cout << 1 << endl << i;
    } else {
      i = i - 3;
      long long q, q1;
      for (long long j = i - 1; j > 1; j -= 2) {
        if (isprime(j) && isprime(i - j)) {
          q = j;
          q1 = i - j;
          break;
        }
      }
      cout << 3 << endl << 3 << " " << q << " " << q1;
    }
  } else {
    if (i == 3)
      cout << 1 << endl << 3;
    else if (i == 4)
      cout << 2 << endl << 2 << " " << 2;
  }
}
