You might have heard about the next game in Lara Croft series coming out this year. You also might have watched its trailer. Though you definitely missed the main idea about its plot, so let me lift the veil of secrecy.

Lara is going to explore yet another dangerous dungeon. Game designers decided to use good old 2D environment. The dungeon can be represented as a rectangle matrix of n rows and m columns. Cell (x, y) is the cell in the x-th row in the y-th column. Lara can move between the neighbouring by side cells in all four directions.

Moreover, she has even chosen the path for herself to avoid all the traps. She enters the dungeon in cell (1, 1), that is top left corner of the matrix. Then she goes down all the way to cell (n, 1) — the bottom left corner. Then she starts moving in the snake fashion — all the way to the right, one cell up, then to the left to the cell in 2-nd column, one cell up. She moves until she runs out of non-visited cells. n and m given are such that she always end up in cell (1, 2).

Lara has already moved to a neighbouring cell k times. Can you determine her current position?

Input

The only line contains three integers n, m and k (2 ≤ n, m ≤ 109, n is always even, 0 ≤ k < n·m). Note that k doesn't fit into 32-bit integer type!

Output

Print the cell (the row and the column where the cell is situated) where Lara ends up after she moves k times.

Examples

Input

4 3 0


Output

1 1


Input

4 3 11


Output

1 2


Input

4 3 7


Output

3 2

Note

Here is her path on matrix 4 by 3:

<image>
import java.io.IOException;
import java.math.BigInteger;
import java.util.*;
import java.io.*;

public class ll {
    public static void main(String[] args) throws Exception {
        gg g = new gg();
    }

}

class gg {
    PrintWriter pw;
    int n, t[];

    gg() throws Exception {
        //      FScanner fs = new FScanner(new FileReader("input.txt"));
        //  pw = new PrintWriter("multimap.out");
        FScanner fs = new FScanner(new InputStreamReader(System.in));
        pw = new PrintWriter(System.out);
        int n = fs.nextInt(), m = fs.nextInt();
        long k = fs.nextLong();
        int x = 1, y = 1;
        if (k < n) {
            System.out.println(x + k + " " + y);
        } else if (k < n + m - 1) {
            k -= n - 1;
            System.out.println(n + " " + (1 + k));
        } else {
            k -= n + m - 2;
            long st = (k-1) / (m - 1) + 1;
            k -= (st*1L - 1) * (m - 1);
            if (st % 2 == 1) {
                System.out.println(n - st + " " + (m - (k - 1)));
            } else {
                System.out.println(n - st + " " + (1 + k));
            }
        }
        pw.close();
    }

    private void del(Link[] np, int i) {
        if (np[i].prev == -1) {
            if (np[i].next < np.length && np[i].next >= 0) {
                np[np[i].next].prev = -1;
            }
        } else {
            np[np[i].prev].next = np[i].next;
            if (np[i].next != np.length)
                np[np[i].next].prev = np[i].prev;
        }
        np[i].prev = -2;
        np[i].next = -2;
    }

    private void org(Link[] np, int[] a) {
        int a1 = -1, a2 = 0, a3 = a.length;
        Link prev = null;
        for (int i = 0; i < np.length; i++)
            np[i] = new Link();
        while (a2 < a.length) {
            while (a2 < a.length && a[a2] == 0)
                a2++;
            if (a2 >= a.length)
                break;
            np[a2] = new Link();
            np[a2].prev = a1;
            if (prev != null)
                prev.next = a2;
            prev = np[a2];
            a2++;
        }
        if (prev != null)
            prev.next = a.length;

    }

    void build(int a[], int v, int tl, int tr) {
        if (tl == tr)
            t[v] = a[tl] != 0 ? tl : -1;
        else {
            int tm = (tl + tr) / 2;
            build(a, v * 2, tl, tm);
            build(a, v * 2 + 1, tm + 1, tr);
            t[v] = Math.max(t[v * 2], t[v * 2 + 1]);
        }
    }

    int sum(int v, int tl, int tr, int l, int r) {
        if (l > r)
            return -1;
        if (l == tl && r == tr)
            return t[v];
        int tm = (tl + tr) / 2;
        return Math.max(sum(v * 2, tl, tm, l, Math.min(r, tm))
                , sum(v * 2 + 1, tm + 1, tr, Math.max(l, tm + 1), r));
    }

    void update(int v, int tl, int tr, int pos, int[] a) {
        if (tl == tr)
            t[v] = a[tl] == 0 ? -1 : t[v];
        else {
            int tm = (tl + tr) / 2;
            if (pos <= tm)
                update(v * 2, tl, tm, pos, a);
            else
                update(v * 2 + 1, tm + 1, tr, pos, a);
            t[v] = Math.max(t[v * 2], t[v * 2 + 1]);
        }
    }
}

class Link {
    int prev, next;
}

class Pair implements Comparable<Pair> {
    long a;
    int x;

    Pair(long x1, int y1) {
        a = x1;
        a = y1;
    }

    @Override
    public int compareTo(Pair o) {
        if (a == o.a)
            return Integer.compare(x, o.x);
        else return Long.compare(a, o.a);
    }
}


class FScanner {
    StringTokenizer st;
    BufferedReader reader;

    FScanner(InputStreamReader isr) throws IOException {
        reader = new BufferedReader(isr);
    }

    String nextLine() throws IOException {
        return reader.readLine();
    }

    String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String s = reader.readLine();
            if (s == null)
                return null;
            st = new StringTokenizer(s);
        }
        return st.nextToken();
    }

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

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    char nextChar() throws IOException {
        return (char) reader.read();
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    int[] iarr(int n) throws IOException {
        int[] mas = new int[n];
        for (int i = 0; i < n; i++)
            mas[i] = nextInt();
        return mas;
    }

    double[] darr(int n) throws IOException {
        double[] mas = new double[n];
        for (int i = 0; i < n; i++)
            mas[i] = nextDouble();
        return mas;
    }

    char[][] cmas2(int n, int m) throws IOException {
        char[][] mas = new char[n][m];
        for (int i = 0; i < n; i++)
            mas[i] = nextLine().toCharArray();
        return mas;
    }

    long[] larr(int n) throws IOException {
        long[] mas = new long[n];
        for (int i = 0; i < n; i++)
            mas[i] = nextLong();
        return mas;
    }
}

class PairP implements Comparable<PairP> {
    double l, r;

    PairP(double l1, double r1) {
        l = l1;
        r = r1;
    }

    @Override
    public int compareTo(PairP o) {
        if (l == o.l)
            return Double.compare(r, o.r);
        else return Double.compare(l, o.l);
    }
}