#include <bits/stdc++.h>
using namespace std;
int mx, mn, w, x, y, ansx, ansy, co = 0;
int rev(int k) {
  int p = 0;
  while (k > 0) {
    p = p * 10 + (k % 10);
    k /= 10;
  }
  return p;
}
int main() {
  map<double, int> m1;
  map<double, int> m2;
  double q;
  cin >> mx;
  cin >> mn;
  cin >> w;
  for (x = 1; x <= mx; x++) {
    q = (double)(x * 1.0 / rev(x));
    m1[q]++;
  }
  x = mx;
  y = 0;
  co = 0;
  while (y <= mn && x >= 1) {
    if (co < w) {
      y++;
      q = (double)((rev(y) * 1.0) / y);
      co += m1[q];
      m2[q]++;
    } else {
      if (ansx * ansy > x * y || ansx == 0) {
        ansx = x;
        ansy = y;
      }
      q = (double)((x * 1.0) / rev(x));
      co -= m2[q];
      m1[q]--;
      x--;
    }
  }
  if (ansx == 0)
    cout << -1;
  else
    cout << ansx << "  " << ansy;
}
