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
#include <bits/stdc++.h>
using namespace std;
int tree[200010], rever[100010];
int maxa, maxb, w;
map<long double, vector<int> > st;
int sum(int x) {
  int ans = 0;
  while (x > 0) {
    ans += tree[x];
    x -= x & -x;
  }
  return ans;
}
void add(int x, int a) {
  while (x <= maxb) {
    tree[x] += a;
    x += x & -x;
  }
}
int rev(int a) {
  char str[10] = {0};
  sprintf(str, "%d", a);
  reverse(str, strlen(str) + str);
  sscanf(str, "%d", &a);
  return a;
}
int main() {
  int lst = 100000, mx, my;
  long long ans = 1000000000000ll;
  scanf("%d%d%d", &maxa, &maxb, &w);
  for (int i = 1; i <= maxb; ++i)
    st[(long double)rev(i) / (long double)i].push_back(i);
  for (int i = 1; i <= ((maxa) < (maxb) ? (maxb) : (maxa)); ++i)
    rever[i] = rev(i);
  for (int a = 1; a <= maxa; ++a) {
    int reva = rever[a];
    if (a % 9 != reva % 9) continue;
    if (st.find((long double)a / (long double)reva) == st.end()) continue;
    vector<int>& vec = st[(long double)a / (long double)reva];
    for (int i = 0; i < vec.size() && vec[i] < lst; ++i)
      if (vec[i] * a == rever[vec[i]] * reva) add(vec[i], 1);
    if (sum(maxb) < w) continue;
    int l = 0, r = maxb;
    while (l < r) {
      int ans = (l + r) >> 1;
      if (sum(ans) >= w)
        r = ans;
      else
        l = ans + 1;
    }
    lst = l;
    if (ans > l * (long long)a) ans = l * (long long)a, mx = a, my = l;
  }
  if (ans < 1000000000000ll)
    printf("%d %d", mx, my);
  else
    printf("-1");
}
