#include using namespace std; // #define int long long #define rep(i, n) for (long long i = (long long)(0); i < (long long)(n); ++i) #define reps(i, n) for (long long i = (long long)(1); i <= (long long)(n); ++i) #define rrep(i, n) for (long long i = ((long long)(n)-1); i >= 0; i--) #define rreps(i, n) for (long long i = ((long long)(n)); i > 0; i--) #define irep(i, m, n) for (long long i = (long long)(m); i < (long long)(n); ++i) #define ireps(i, m, n) for (long long i = (long long)(m); i <= (long long)(n); ++i) #define SORT(v, n) sort(v, v + n); #define REVERSE(v, n) reverse(v, v+n); #define vsort(v) sort(v.begin(), v.end()); #define all(v) v.begin(), v.end() #define mp(n, m) make_pair(n, m); #define cout(d) cout<; using vvi = vector; using vll = vector; using vvll = vector; using pii = pair; using pll = pair; using vs = vector; using vpll = vector>; using vtp = vector>; using vb = vector; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const ll INF = 1e9+10; const ll MOD = 1e9+7; const ll LINF = 1e18; const ll maxn_eratosthenes = 100005; bool _is_prime[maxn_eratosthenes]; vector P; void eratosthenes(const ll N) { P.clear(); for (ll i = 0; i <= N; i++) { _is_prime[i] = true; } _is_prime[0]=_is_prime[1]=false; for (ll i = 2; i <= N; i++) { if (_is_prime[i]) { for (ll j = 2 * i; j <= N; j += i) { _is_prime[j] = false; } P.emplace_back(i); } } } ll dp[3000][20005]; signed main() { cin.tie( 0 ); ios::sync_with_stdio( false ); ll n; cin>>n; eratosthenes(n); // cout<0) cout<