#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int k = 1, x;
  cin >> x;
  while (1) {
    if (x % 2 == 0) {
      x /= 2;
      k *= 2;
    } else
      break;
  }
  cout << k << " " << x;
  return 0;
}
