#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    long long int m = n;
    int f = 1;
    while (f) {
      f = 0;
      for (int i = 2; i <= sqrt(m); i++) {
        if (m % i == 0) {
          f = 1;
          m--;
          break;
        }
      }
    }
    if (m == n) {
      cout << 1 << endl;
      cout << m << endl;
      return 0;
    }
    set<int> s;
    for (int i = 2; i <= 300; i++) {
      f = 0;
      for (int j = 2; j <= sqrt(i); j++) {
        if (i % j == 0) {
          f = 1;
          break;
        }
      }
      if (!f) s.insert(i);
    }
    long long int diff = n - m;
    for (auto i : s) {
      if (diff == i) {
        cout << 2 << endl;
        cout << m << " " << n - m << endl;
        return 0;
      }
    }
    for (auto i : s) {
      long long int diff2 = diff - i;
      if (s.find(diff2) != s.end()) {
        cout << 3 << endl;
        cout << m << " " << i << " " << diff2 << endl;
        return 0;
      }
    }
  }
  cerr << "Time elapsed : " << clock() * 1000.0 / CLOCKS_PER_SEC << "ms"
       << '\n';
  return 0;
}
