#include <iostream>
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
if ( n % 2 == 0 ) cout << n - 2 << endl << n - 4;
else cout << n - 1 << endl << n - 3;
return 0;
}