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;
vector<int> record[100005], f[100005], g[100005];
map<long long, int> D;
long long k, ans;
double tmp;
int a[25], s, i, rev, tp, j, p, sum, cnt, tot, A, B, C, r, x, y;
inline int get(int k) {
  for (s = 0, cnt = 0; k; s = s * 10 + k % 10, k /= 10)
    ;
  return s;
}
int main() {
  for (i = 1; i <= 100000; i++) {
    rev = get(i);
    tmp = rev * 1. / i;
    k = (long long)(tmp * 1000000000ll);
    if (!(p = D[k])) p = D[k] = ++tot;
    record[p].push_back(i);
    tmp = i * 1. / rev;
    k = (long long)(tmp * 1000000000ll);
    if (!(p = D[k])) continue;
    for (j = 0; j < record[p].size(); j++) {
      tp = record[p][j];
      g[tp].push_back(i);
      if (i != tp) g[i].push_back(tp);
      f[i].push_back(tp);
      if (i != tp) f[tp].push_back(i);
    }
  }
  scanf("%d%d%d", &A, &B, &C);
  r = B;
  sum = 0;
  ans = -1;
  for (i = 1; i <= A; i++) {
    for (j = 0; j < g[i].size(); j++)
      if (g[i][j] <= r)
        sum++;
      else
        break;
    while (sum >= C && r) {
      if (i * 1ll * r < ans || ans == -1) ans = i * 1ll * r, x = i, y = r;
      for (j = 0; j < f[r].size(); j++)
        if (f[r][j] <= i)
          sum--;
        else
          break;
      r--;
    }
  }
  if (ans == -1)
    puts("-1");
  else
    printf("%d %d", x, y);
  return 0;
}