#include<bits/stdc++.h>
using namespace std;
bool is_prime(int x){
if(x == 1){
return false;
}
for(int i = 2;i <= sqrt(x);i++){
if(x % i == 0){
return false;
}
}
return true;
}
int main(){
int n;
cin >> n;
for(int i = 2;i < n - 1;i++){
if(is_prime(i) and is_prime(i) and is_prime(n - i - i) and i + i + (n - i - i) == n){
cout << i << " " << i << " " << n - i - i;
return 0;
}
}
}