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>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
struct Tree {
  int n;
  int t[4 * 100001 + 1];
  void build(int sz);
  void build(int i, int l, int r);
  void add(int pos, int val);
  void add(int pos, int val, int i, int l, int r);
  int get_kth(int k);
  int get_kth(int k, int i, int l, int r);
};
void Tree::build(int sz) {
  n = sz;
  build(1, 0, n - 1);
}
void Tree::build(int i, int l, int r) {
  if (l == r) {
    t[i] = 0;
    return;
  }
  int m = (l + r) / 2;
  build(i * 2, l, m);
  build(i * 2 + 1, m + 1, r);
  t[i] = t[i * 2] + t[i * 2 + 1];
}
void Tree::add(int pos, int val) { add(pos, val, 1, 0, n - 1); }
void Tree::add(int pos, int val, int i, int l, int r) {
  t[i] += val;
  if (l == r) return;
  int m = (l + r) / 2;
  if (pos <= m)
    add(pos, val, i * 2, l, m);
  else
    add(pos, val, i * 2 + 1, m + 1, r);
}
int Tree::get_kth(int k) { return get_kth(k, 1, 0, n - 1); }
int Tree::get_kth(int k, int i, int l, int r) {
  assert(k >= 0 && k < t[i]);
  if (l == r) return l;
  int m = (l + r) / 2;
  if (k < t[i * 2])
    return get_kth(k, i * 2, l, m);
  else
    return get_kth(k - t[i * 2], i * 2 + 1, m + 1, r);
}
int rev(int x) {
  char s[64];
  int r = 0;
  for (int i = (sprintf(s, "%d", x)) - 1; i >= 0; --i) r = r * 10 + s[i] - '0';
  return r;
}
Tree t;
int maxx, maxy, w;
map<double, vector<int> > g;
void solution() {
  cin >> maxx >> maxy >> w;
  for (int i = 1; i <= maxy; i++) {
    double ratio = rev(i) * 1. / i;
    g[ratio].push_back(i);
  }
  t.build(maxy + 1);
  int x = -1, y, into = 0;
  for (int i = 1; i <= maxx; i++) {
    double ratio = i * 1. / rev(i);
    vector<int>& v = g[ratio];
    for (int j = 0, _n = ((int)((v).size())); j < _n; ++j) t.add(v[j], +1);
    into += (int)((v).size());
    if (into < w) continue;
    int val = t.get_kth(w - 1);
    if (x == -1 || i * val < x * y) x = i, y = val;
  }
  if (x == -1)
    puts("-1");
  else
    printf("%d %d\n", x, y);
}
int main() {
  solution();
  return 0;
}