#include <cstdio> #include <cstring> using namespace std; int main() { int n; bool arr1[1005]; memset(arr1, 1, sizeof(arr1)); arr1[0] = false; arr1[1] = false; for(int i=2; i<1001; i++) { for(int j=2; i*j<1001; j++) { arr1[i*j] = false; } } while (EOF != scanf("%d", &n)) { for(int i=n/2; i>1; i--) { if(arr1[i] && arr1[n-i]) { printf("%d\n%d\n", i, n-i); break; } } } return 0; }