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 + 5;
map<pair<int, int>, int> remx, remy;
int d[MAXN];
int rev[MAXN];
int gcd(int x, int y) {
  if (!y) return x;
  return gcd(y, x % y);
}
int get_rev(int x) {
  int res = 0, a;
  while (x) {
    a = x % 10;
    res = res * 10 + a;
    x /= 10;
  }
  return res;
}
void init(int ma) {
  remx.clear(), remy.clear();
  for (int i = 1; i <= ma; i++) rev[i] = get_rev(i);
  for (int i = 1; i <= ma; i++) {
    d[i] = gcd(i, rev[i]);
    remy[make_pair(i / d[i], rev[i] / d[i])]++;
  }
}
void solve(int max_x, int max_y, int W) {
  bool flag = false;
  if (max_x > max_y) {
    swap(max_x, max_y);
    flag = true;
  }
  init(max_y);
  int x = 1, y = max_y;
  int now = remy[make_pair(1, 1)];
  remx[make_pair(1, 1)]++;
  int ans_x = -1, ans_y = -1;
  while (x <= y) {
    while (x < y && x < max_x && now < W) {
      x++;
      remx[make_pair(rev[x] / d[x], x / d[x])]++;
      now += remy[make_pair(rev[x] / d[x], x / d[x])];
    }
    if (now < W) break;
    if (ans_x == -1 || (long long)x * y < (long long)ans_x * ans_y) {
      ans_x = x, ans_y = y;
    }
    remy[make_pair(y / d[y], rev[y] / d[y])]--;
    now -= remx[make_pair(y / d[y], rev[y] / d[y])];
    y--;
  }
  if (flag) swap(ans_x, ans_y);
  if (ans_x == -1)
    puts("-1");
  else
    printf("%d %d\n", ans_x, ans_y);
  return;
}
int main() {
  int max_x, max_y, W;
  while (~scanf("%d %d %d", &max_x, &max_y, &W)) {
    solve(max_x, max_y, W);
  }
  return 0;
}
