#include <bits/stdc++.h>
using namespace std;
bool is0or1(string number) {
for (char c : number) {
if (c != '0' && c != '1') {
return false;
}
}
return true;
}
int main() {
long long a;
cin >> a;
long long b = 1;
while (true) {
long long product = a * b;
if (is0or1(to_string(product))) {
cout << b << ' ' << product << endl;
break;
}
b++;
}
return 0;
}