Problem: In Walrusland public transport tickets are characterized by two integers: by the number of the series and by the number of the ticket in the series. Let the series number be represented by a and the ticket number — by b, then a ticket is described by the ordered pair of numbers (a, b). 

The walruses believe that a ticket is lucky if a * b = rev(a) * rev(b). The function rev(x) reverses a number written in the decimal system, at that the leading zeroes disappear. For example, rev(12343) = 34321, rev(1200) = 21.

The Public Transport Management Committee wants to release x series, each containing y tickets, so that at least w lucky tickets were released and the total number of released tickets (x * y) were minimum. The series are numbered from 1 to x inclusive. The tickets in each series are numbered from 1 to y inclusive. The Transport Committee cannot release more than maxx series and more than maxy tickets in one series.

Input

The first line contains three integers maxx, maxy, w (1 ≤ maxx, maxy ≤ 105, 1 ≤ w ≤ 107).

Output

Print on a single line two space-separated numbers, the x and the y. If there are several possible variants, print any of them. If such x and y do not exist, print a single number  - 1.

Examples

Input

2 2 1


Output

1 1

Input

132 10 35


Output

7 5

Input

5 18 1000


Output

-1


Input

48 132 235


Output

22 111

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 7;
const int M = 300;
const int mod = 999983;
const int inf = 1e9 + 7;
const double pi = acos(-1);
const int maxn = N * 2;
const double PI = acos(-1);
int rev(int x) {
  int nw = 0;
  while (x) {
    nw = nw * 10 + (x % 10);
    x /= 10;
  }
  return nw;
}
int gcd(int u, int v) { return (u == 0) ? v : gcd(v % u, u); }
map<pair<int, int>, int> st;
map<pair<int, int>, int> pre;
int n, m, w;
pair<int, int> get(int u) {
  int v = rev(u);
  int d = gcd(u, v);
  u /= d;
  v /= d;
  return make_pair(u, v);
}
void solve() {
  cin >> n >> m >> w;
  for (int i = 1; i <= m; i++) {
    st[get(i)]++;
  }
  long long ans = (long long)inf * inf;
  long long cur = 0;
  int l = -1, r = -1;
  for (int i = 1; i <= n; i++) {
    int u = i, v = rev(i);
    int d = gcd(u, v);
    u /= d;
    v /= d;
    pre[make_pair(v, u)]++;
    cur += st[make_pair(v, u)];
    while (m > 0 && cur - pre[get(m)] >= w) {
      cur -= pre[get(m)];
      st[get(m)]--;
      m--;
    }
    if (cur >= w && (long long)i * m < ans) {
      l = i;
      r = m;
      ans = min(ans, (long long)l * r);
    }
  }
  if (l == -1)
    puts("-1");
  else
    cout << l << " " << r;
}
int main() {
  int T = 1;
  for (int i = (1); i < (T + 1); i++) {
    solve();
  }
}