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
import java.util.InputMismatchException;
import java.util.Random;
import java.util.Comparator;
import java.io.*;
import java.util.Arrays;
import java.util.HashMap;

/**
 * Generated by Contest helper plug-in
 * Actual solution is at the bottom
 */
public class Main {
    public static void main(String[] args) {
        InputReader in = new StreamInputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        run(in, out);
    }

    public static void run(InputReader in, PrintWriter out) {
        Solver solver = new LuckNumbers();
        solver.solve(1, in, out);
        Exit.exit(in, out);
    }
}

class StreamInputReader extends InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar, numChars;

    public StreamInputReader(InputStream stream) {
        this.stream = stream;
        curChar = 0;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    @Override
    public void close() {
        try {
            stream.close();
        } catch (IOException ignored) {
        }
    }
}

abstract class InputReader {
    private boolean finished = false;

    public abstract int read();

    public int nextInt() {
        return Integer.parseInt(nextToken());
    }


    public String nextToken() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }
    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public void setFinished(boolean finished) {
        this.finished = finished;
    }

    public abstract void close();
}

interface Solver {
    public void solve(int testNumber, InputReader in, PrintWriter out);
}

class Exit {
    private Exit() {
    }

    public static void exit(InputReader in, PrintWriter out) {
        in.setFinished(true);
        in.close();
        out.close();
    }
}

class MathUtils {
    public static int gcd(int a, int b) {
        if (a < 0) a = -a;
        if (b < 0) b = -b;
        while (a > 0 && b > 0) {
            if (a > b) a %= b;
            else b %= a;
        }
        return a + b;
    }

}

 class Structures {


    public static class Mapping<K> {
        public HashMap<K, Integer> map;

        public Mapping() {
            map = new HashMap<K, Integer> () ;
        }
        public void increaseValue(K key, int value) {
            Integer previous = map.get(key);
            if (previous == null) {
                map.put(key, value);
            } else map.put(key, value + previous);
        }
        public int getValue(K key) {
            Integer get = map.get(key);
            return get ==  null ? 0 : get;
        }
        public void decreaseValue(K key, int value) {
            Integer p = map.get(key);
            if (p == null) return;
            p -= value;
            map.put(key, p);
        }
        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            Mapping mapping = (Mapping) o;

            if (map != null ? !map.equals(mapping.map) : mapping.map != null) return false;

            return true;
        }

        @Override
        public int hashCode() {
            return map != null ? map.hashCode() : 0;
        }
    }


    }

class LuckNumbers implements Solver {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int maxX = in.nextInt();
        int maxY = in.nextInt();
        int w = in.nextInt();
        Structures.Mapping<Fraction> serial = new Structures.Mapping<Fraction> () ;
        Structures.Mapping<Fraction> number = new Structures.Mapping<Fraction> () ;
        for (int i = 1; i <= maxX; ++i) {
            serial.increaseValue(new Fraction(i, getReverse(i)), 1);
        }
        int count = 0;
        int curX = maxX;
        int curY = 1;
        long res = -1;
        int ansX = -1, ansY = -1;
        while (curX >= 0 && curY <= maxY + 1) {
            if (count >= w && (res == -1 || res > (long ) curX * curY)) {
                res = (long ) curX * curY;
                ansY = (curY - 1);
                ansX = curX;
            }
            if (count >= w) {
                if (curX < 1) break;
                Fraction del = new Fraction(curX, getReverse(curX));
                count -= number.getValue(del.reverse());
                serial.decreaseValue(del, 1);
                --curX;
            } else {
                if (curY > maxY) break;
                Fraction del = new Fraction(curY, getReverse(curY));
                count += serial.getValue(del.reverse());
                ++curY;
                number.increaseValue(del, 1);
            }
        }
        if (res == -1) {
            out.print(-1);
        } else {
            out.print(ansX + " " + ansY);
        }
    }
    int getReverse(int a) {
        int r = 0;
        while (a > 0) {
            r = r * 10 + (a % 10);
            a /= 10;
        }
        return r;
    }
    class Fraction {
        int a, b;

        Fraction reverse() {
            return new Fraction(b, a);
        }

        Fraction(int a, int b) {
            int g = MathUtils.gcd(a, b);
            this.a = a / g;
            this.b = b / g;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Fraction)) return false;

            Fraction fraction = (Fraction) o;

            if (a != fraction.a) return false;
            if (b != fraction.b) return false;

            return true;
        }

        @Override
        public int hashCode() {
            int result = a;
            result = 31 * result + b;
            return result;
        }
    }
}
