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 gcd(int n, int m) {
  if (n == 0) return m;
  return gcd(m % n, n);
}
int reverseNumber(int x) {
  int temp = 0;
  while (x) {
    temp = 10 * temp + (x % 10);
    x /= 10;
  }
  return temp;
}
pair<int, int> getNormalizedCount1(int x) {
  int revX = reverseNumber(x);
  int g = gcd(x, revX);
  return make_pair(x / g, revX / g);
}
pair<int, int> getNormalizedCount2(int x) {
  pair<int, int> pr = getNormalizedCount1(x);
  return make_pair(pr.second, pr.first);
}
int main() {
  int maxX, maxY, w;
  scanf("%d%d%d", &maxX, &maxY, &w);
  map<pair<int, int>, int> count1, count2;
  long long int total = 0;
  for (int i = 1; i <= maxY; ++i) {
    count1[getNormalizedCount1(i)]++;
  }
  int curY = maxY, ans_x, ans_y;
  long long int mx = ((long long int)maxY) * ((long long int)(maxX + 1));
  long long int ans = mx;
  for (int i = 1; i <= maxX; ++i) {
    total += count1[getNormalizedCount2(i)];
    ++count2[getNormalizedCount2(i)];
    while (curY > 0) {
      int temp = count2[getNormalizedCount1(curY)];
      if ((total - temp) < w) break;
      total -= temp;
      --count1[getNormalizedCount1(curY)];
      --curY;
    }
    if (total >= w) {
      long long int cur_ans = ((long long int)i) * ((long long int)curY);
      if (cur_ans < ans) {
        ans = cur_ans;
        ans_x = i;
        ans_y = curY;
      }
    }
  }
  if (ans == mx)
    printf("-1\n");
  else
    printf("%d %d\n", ans_x, ans_y);
  return 0;
}
