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;
const int MaxN = 100000;
vector<int> a[MaxN + 5];
int x, y, w;
int rev[MaxN + 5];
struct number {
  int idx;
  double o;
};
number nA[MaxN + 5], nB[MaxN + 5];
int rr(int x) {
  int r = 0;
  while (x) {
    r = r * 10 + x % 10;
    x /= 10;
  }
  return r;
}
bool cmp(number a, number b) {
  return a.o + 0.000000001 < b.o ||
         (fabs(a.o - b.o) < 0.000000001 && a.idx < b.idx);
}
int comp(long long a, long long b, long long c, long long d) {
  if (a * b == c * d) return 0;
  if (a * b < c * d) return -1;
  return 1;
}
int cum[MaxN + 5];
void add(int idx) {
  while (idx <= MaxN) {
    cum[idx]++;
    idx += idx & (-idx);
  }
}
int sum(int idx) {
  int r = 0;
  while (idx) {
    r += cum[idx];
    idx -= idx & (-idx);
  }
  return r;
}
int main() {
  for (int i = 1; i <= MaxN; i++) {
    rev[i] = rr(i);
    nA[i].idx = i;
    nA[i].o = double(i) / double(rev[i]);
    nB[i].idx = i;
    nB[i].o = double(rev[i]) / double(i);
  }
  sort(nA + 1, nA + MaxN + 1, cmp);
  sort(nB + 1, nB + MaxN + 1, cmp);
  int i = 1, j = 1;
  while (i <= MaxN && j <= MaxN) {
    int c = comp(nA[i].idx, nB[j].idx, rev[nA[i].idx], rev[nB[j].idx]);
    if (c == -1)
      i++;
    else if (c == 0) {
      for (int k = j;
           comp(nA[i].idx, nB[k].idx, rev[nA[i].idx], rev[nB[k].idx]) == 0 &&
           k <= MaxN;
           k++)
        a[nA[i].idx].push_back(nB[k].idx);
      i++;
    } else
      j++;
  }
  scanf("%d%d%d", &x, &y, &w);
  memset(cum, 0, sizeof(cum));
  int solX = 2123456789, solY = 2123456789;
  for (int i = 1; i <= x; i++) {
    for (int j = 0; j < a[i].size(); j++) add(a[i][j]);
    int l = 1, r = MaxN, k;
    while (l < r) {
      k = (l + r) / 2;
      if (sum(k) >= w) {
        if (sum(k - 1) >= w)
          r = k - 1;
        else
          break;
      } else
        l = k + 1;
    }
    if (sum(k - 1) >= w && k - 1 <= y) {
      if (comp(solX, solY, i, k - 1) == 1) {
        solX = i;
        solY = k - 1;
      }
    } else if (sum(k) >= w && k <= y) {
      if (comp(solX, solY, i, k) == 1) {
        solX = i;
        solY = k;
      }
    } else if (sum(k + 1) >= w && k + 1 <= y) {
      if (comp(solX, solY, i, k + 1) == 1) {
        solX = i;
        solY = k + 1;
      }
    }
  }
  if (solX == 2123456789) {
    printf("-1\n");
    return 0;
  }
  printf("%d %d\n", solX, solY);
  return 0;
}
