#include using namespace std; int main(){ int n; cin >> n; if(n>10) cout << n-10 << " " << 10 << endl; else cout << 1 << " " << n-1 << endl; return 0; }