#include <iostream>
#include <algorithm>
#include <cmath>
#include <set>
#include <vector>
#include <map>
#include <stack>
#include <cstring>
#include <fstream>
#include <sstream>
#include <numeric>
#include <functional>
// ___<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>___
using namespace std;
// ___<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>___
// Debugging Template
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif
// ___<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>___
#define rep(i,n) for(int i = 0; i < int(n); i++)
#define REP(i,st,en) for (int i = st; i <= int(en); i++)
#define yes cout << "YES\n"
#define no cout << "NO\n"
#define clr(a, init) memset(a, init, sizeof a)
#define oo (2e9)
#define all(v) ((v).begin()), ((v).end())
#define sz(v) ((int)((v).size()))
// ___<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>___
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
typedef long double ld;
typedef vector<int> vi;
// ___<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>___
void file_io();
void PLAY();
ll power(ll b, ll n, ll MOD);
ll findlcm(vector<int> arr, int n);
int gcd(int a, int b);
ll max_subarray_sum(vector<int> A);
// ___<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>______<><><>___
const int N = int(1e7) + 10;
vi prime(N + 1, 1);
void sieve(int n) {
prime[0] = prime[1] = 0;
for (int i = 2; i * i <= n; i++) {
if (!prime[i]) continue;
int j = i + i;
while (j <= n) {
prime[j] = 0;
j+=i;
}
}
}
int solve(int n) {
for(int i = n; i >= 0; i--)
{
if(prime[i])
return i;
}
}
int main() {
//PLAY();
sieve(N);
int n;
while (cin >> n) {
if (n < 8) {
cout << "Impossible.\n";
continue;
}
int p1 = solve(n - 6);
n -= p1;
int p2 = solve(n - 4);
n -= p2;
int p3 = solve(n - 2);
n -= p3;
int p4 = n;
printf("%d %d %d %d\n", p1, p2, p3, p4);
}
}
void file_io()
{
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
}
void PLAY()
{
ios_base::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
}
ll max_subarray_sum(vector<int> A) {
int n = A.size();
vector<ll> local(n);
ll global = A[0];
local[0] = A[0];
for (int i = 1; i < n; i++) {
local[i] = max(local[i-1] + A[i], (long long)(A[i]));
global = max(global, local[i]);
}
return global;
}
ll power(ll b, ll n, ll MOD) {
if (n < 0)
return cerr << "n must be non-negative\n", 0;
if (n == 0)
return 1;
if (n == 1)
return b % MOD;
if (n % 2 == 0) {
b %= MOD;
b *= b;
b %= MOD;
return power(b, n / 2, MOD) % MOD;
}
// if (n % 2 == 1) return b * power(b * b, (n - 1) / 2)
b %= MOD;
return ( (b) * (power(b*b, --n / 2, MOD) % MOD) ) % MOD;
}
ll findlcm(vector<int> arr, int n)
{
// Initialize result
ll ans = arr[0];
// ans contains LCM of arr[0], ..arr[i]
// after i'th iteration,
for (int i = 1; i < n; i++)
ans = (((arr[i] * ans)) /
(gcd(arr[i], ans)));
return ans;
}
int gcd(int a, int b)
{
if (b == 0)
return a;
return gcd(b, a % b);
}