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 JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

public class C {
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	static PrintWriter pw = new PrintWriter(System.out);
	
	static class Fraction implements Comparable<Fraction> {
		int n, d;
		public Fraction (int _n, int _d) {
			n = _n;
			d = _d;
		}
		@Override
		public boolean equals(Object f) {
			return (long)n*((Fraction)f).d == (long)d*((Fraction)f).n;
		}
		@Override
		public int hashCode () {
			return n/d + d/n;
		}
		public int compareTo(Fraction f) {
			long q = (long)n*f.d - (long)d*f.n;
			return q > 0L ? 1 : q < 0L ? -1 : 0;
		}
		public String toString() {
			return n + "/" + d;
		}
	}
	
	public static void main(String[] args) throws IOException {
		StringTokenizer st = new StringTokenizer(br.readLine());
		br.close();
		
		int mx = Integer.parseInt(st.nextToken());
		int my = Integer.parseInt(st.nextToken());
		int w = Integer.parseInt(st.nextToken());
		
		int x = 1000000, y = 1000000;
		
		int cx;
		int cy = 1;
		
		Map<Fraction, Integer> c1 = new HashMap<Fraction, Integer>();
		Map<Fraction, Integer> c2 = new HashMap<Fraction, Integer>();
		
		Fraction f;
		
		for (int i = 1; i <= mx; i++) {
			f = new Fraction(i, rev(i));
			c1.put(f, 1 + c1.getOrDefault(f, 0));
		}
		f = new Fraction(1,1);
		c2.put(f, 1);
		
		int nTickets = c1.get(f);
		
		table:for (cx = mx; cx > 0; cx--) {
			while (nTickets < w) {
				cy++;
				if (cy > my)
					break table;
				f = new Fraction(rev(cy), cy);
				nTickets += c1.getOrDefault(f, 0);
				c2.put(f, 1 + c2.getOrDefault(f, 0));
			}
			if ((long)cx*cy < (long)x*y) {
				x = cx;
				y = cy;
			}
			f = new Fraction(cx, rev(cx));
			nTickets -= c2.getOrDefault(f, 0);
			c1.put(f, c1.get(f) - 1);
		}
		if (x == 1000000) {
			pw.print("-1\n");
		}
		else {
			pw.printf("%d %d\n", x, y);
		}
		pw.close();
	}

	private static int rev(int i) {
		int res = 0;
		while (i > 0) {
			res *= 10;
			res += i%10;
			i /= 10;
		}
		return res;
	}
}