#include <bits/stdc++.h>
using namespace std;
bool p[10000019];
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
memset(p, 1, sizeof p);
for(long long i = 2; i <= 10000009; ++i){
if(p[i]){
for(long long j = i * i; j <= 10000009; j += i)
p[j] = 0;
}
}
int n;
while(cin >> n){
bool found = false;
int i, j, k;
for(i = 2; i <= 3; ++i){
for(j = 2; j <= 3; ++j){
for(k = 2; k <= 3; ++k){
if(n - i - j - k >= 2){
if(p[n - i - j - k]){
found = true;
break;
}
}
}
if(found)
break;
}
if(found)
break;
}
if(found)
cout << i << " " << j << " " << k << " " << n - i - j - k << '\n';
else
cout << "Impossible.\n";
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpib29sIHBbMTAwMDAwMTldOwoKaW50IG1haW4oKXsKCiAgICBpb3M6OnN5bmNfd2l0aF9zdGRpbygwKTsKICAgIGNpbi50aWUoMCk7CiAgICBjb3V0LnRpZSgwKTsKCiAgICBtZW1zZXQocCwgMSwgc2l6ZW9mIHApOwogICAgZm9yKGxvbmcgbG9uZyBpID0gMjsgaSA8PSAxMDAwMDAwOTsgKytpKXsKICAgICAgICBpZihwW2ldKXsKICAgICAgICAgICAgZm9yKGxvbmcgbG9uZyBqID0gaSAqIGk7IGogPD0gMTAwMDAwMDk7IGogKz0gaSkKICAgICAgICAgICAgICAgIHBbal0gPSAwOwogICAgICAgIH0KICAgIH0KICAgIGludCBuOwogICAgd2hpbGUoY2luID4+IG4pewogICAgICAgIGJvb2wgZm91bmQgPSBmYWxzZTsKICAgICAgICBpbnQgaSwgaiwgazsKICAgICAgICBmb3IoaSA9IDI7IGkgPD0gMzsgKytpKXsKICAgICAgICAgICAgZm9yKGogPSAyOyBqIDw9IDM7ICsrail7CiAgICAgICAgICAgICAgICBmb3IoayA9IDI7IGsgPD0gMzsgKytrKXsKICAgICAgICAgICAgICAgICAgICBpZihuIC0gaSAtIGogLSBrID49IDIpewogICAgICAgICAgICAgICAgICAgICAgICBpZihwW24gLSBpIC0gaiAtIGtdKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYoZm91bmQpCiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYoZm91bmQpCiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICAgICAgaWYoZm91bmQpCiAgICAgICAgICAgIGNvdXQgPDwgaSA8PCAiICIgPDwgaiA8PCAiICIgPDwgayA8PCAiICIgPDwgbiAtIGkgLSBqIC0gayA8PCAnXG4nOwogICAgICAgIGVsc2UKICAgICAgICAgICAgY291dCA8PCAiSW1wb3NzaWJsZS5cbiI7CiAgICB9CiAgICByZXR1cm4gMDsKfQ==