#include <bits/stdc++.h>
using namespace std;
long long ans[100010];
long long qpow(long long a, long long b) {
  if (b == 0) return 1;
  long long h = qpow(a, b / 2);
  if (b % 2)
    return (((h * h) % 1000000007LL) * a) % 1000000007LL;
  else
    return (h * h) % 1000000007LL;
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, t;
  cin >> n;
  int ans1, ans2, ans3;
  ans1 = ans2 = ans3 = -1;
  int cp = n;
  if (n <= 7) cout << "1\n" << n;
  if (n <= 7) return 0;
  for (int i = 4; i <= n; i++) {
    bool prime = true;
    if ((cp - i) != 2 && (cp - i) % 2 == 0) prime = false;
    if (prime)
      for (int j = 3; j <= (cp - i) / j; j += 2) {
        if ((cp - i) % j == 0) {
          prime = false;
          break;
        }
      }
    if (prime) {
      for (int a = 2; a <= i - 2; a++) {
        bool aprime = true;
        if (a != 2) {
          for (int jj = 2; jj <= a / jj; jj++) {
            if (a % jj == 0) {
              aprime = false;
              break;
            }
          }
        }
        if (aprime) {
          bool kkprime = true;
          if (i - a != 2)
            for (int kk = 2; kk <= (i - a) / kk; kk++) {
              if ((i - a) % kk == 0) {
                kkprime = false;
                break;
              }
            }
          if (kkprime) {
            ans1 = i - a;
            ans2 = a;
            ans3 = cp - i;
            break;
          }
        }
        if (ans3 != -1) break;
      }
    }
    if (ans3 != -1) break;
  }
  cout << "3\n";
  cout << ans1 << " " << ans2 << " " << ans3 << endl;
  return 0;
}
