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;
template <class T>
T sqr(const T& t) {
  return t * t;
}
template <class T>
T abs(const T& t) {
  return ((t > 0) ? (t) : (-t));
}
void initialize() {
  freopen("_.in", "r", stdin);
  freopen("_.out", "w", stdout);
}
struct Point {
  int x;
  int y;
  Point(int x_, int y_) : x(x_), y(y_) {}
};
map<pair<int, int>, vector<int> > fractions;
int rev(int a) {
  int res = 0;
  while (a > 0) {
    res = res * 10 + (a % 10);
    a /= 10;
  }
  return res;
}
int nod(int a, int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  return nod(b, a % b);
}
pair<int, int> fraction(int num) {
  int a = num;
  int b = rev(a);
  int d = nod(a, b);
  a /= d;
  b /= d;
  return pair<int, int>(a, b);
}
int main() {
  int maxX, maxY, w;
  cin >> maxX >> maxY >> w;
  for (int i = 1; i <= max(maxX, maxY); ++i) {
    fractions[fraction(i)].push_back(i);
  }
  map<pair<int, int>, vector<int> >::iterator it = fractions.begin(),
                                              jt = fractions.end();
  for (; it != jt; ++it) {
    sort(it->second.begin(), it->second.end());
  }
  const long long INF = (long long)maxX * (long long)maxY + 1;
  long long bestProduct = INF;
  int rx = -1, ry = -1;
  int res = 0;
  int y = maxY;
  for (int x = 1; x <= maxX; ++x) {
    pair<int, int> f = fraction(x);
    swap(f.first, f.second);
    const vector<int>& v = fractions[f];
    res += upper_bound(v.begin(), v.end(), y) - v.begin();
    do {
      pair<int, int> fy = fraction(y);
      swap(fy.first, fy.second);
      const vector<int>& vy = fractions[fy];
      res -= upper_bound(vy.begin(), vy.end(), x) - vy.begin();
      y -= 1;
    } while (res >= w && y > 0);
    y += 1;
    pair<int, int> fy = fraction(y);
    swap(fy.first, fy.second);
    const vector<int>& vy = fractions[fy];
    res += upper_bound(vy.begin(), vy.end(), x) - vy.begin();
    if (res >= w) {
      long long product = (long long)x * (long long)y;
      if (product < bestProduct) {
        bestProduct = product;
        rx = x;
        ry = y;
      }
    }
  }
  if (bestProduct < INF) {
    cout << rx << " " << ry << endl;
  } else {
    cout << -1 << endl;
  }
  return 0;
}
