#include <bits/stdc++.h>
using namespace std;
using ll = long long;

bool prime(ll x) {
    if (x < 2)
        return false;
    for (ll d = 2; d * d <= x; d++)
        if (x % d == 0)
            return false;
    return true;
}
int main() {
    ll n;
    cin >> n;
    if (prime(n)) {
        cout << 1 << '\n' << n << '\n';
        return 0;
    }
    if (prime(n - 2)) {
        cout << 2 << "\n2 " << n - 2 << '\n';
        return 0;
    }
    for (ll p = 2; p <= n - 3; p++)
        if (prime(p) && prime(n - 3 - p)) {
            cout << 3 << "\n3 " << p << ' ' << n - 3 - p << '\n';
            break;
        }
}
