#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { long long n; cin >> n; bool bo = true, bo1 = true; long long n1 = n - 3; long long n2 = n - 5; while (n1 != 0 && n1 % 2 == 0) { n1 /= 2; } while (n2 != 0 && n2 % 2 == 0) { n2 /= 2; } if (n1 <= 1) { bo = false; } if (n2 <= 1) { bo1 = false; } if (bo) { cout << 3 << " " << n - 3 << endl; } else if (bo1) { cout << 5 << " " << n - 5 << endl; } else { cout << "-1" << endl; } }