#include using namespace std; int main(){ int N; cin >> N; if (N <= 10){ cout << 1 << ' ' << N - 1 << endl; } else { cout << 10 << ' ' << N - 10 << endl; } }