Problem: A line on the plane is described by an equation Ax + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from  - 5·1018 to 5·1018 inclusive, or to find out that such points do not exist.

Input

The first line contains three integers A, B and C ( - 2·109 ≤ A, B, C ≤ 2·109) — corresponding coefficients of the line equation. It is guaranteed that A2 + B2 > 0.

Output

If the required point exists, output its coordinates, otherwise output -1.

Examples

Input

2 5 3


Output

6 -3

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;
import java.math.*; // for bigInteger

public class practice {   

    private final static int M = (int)1e9+7;
	
    private static final InputReader scan = new InputReader(System.in);
    private static final PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    private static final StringBuilder sb = new StringBuilder();

  	public static void main(String args[]) throws Exception {
        //scanner scan = new scanner(system.in);
        //scan.usedelimiter("");  // for reading character by character
         
        long a = scan.nextLong(), b = scan.nextLong(), c = -scan.nextLong();
        
        long rpp = Math.abs(a), rp = Math.abs(b), r = -1;
        long xpp = 1, xp = 0, x = -1;
        long ypp = 0, yp = 1, y = -1;
         
        while(r!=0) {
            long q = (rp!=0)?rpp/rp:0;
            r = rpp-rp*q;
            x = xpp-xp*q;
            y = ypp-yp*q;
            rpp = rp;
            rp = r;
            xpp = xp;
            xp = x;
            ypp = yp;
            yp = y;
        } 

        long g = rpp;
        x = xpp*(c/g);
        y = ypp*(c/g);
        if(Math.abs(xpp)*Math.abs(c/g)<0)  x=Long.MAX_VALUE;
        if(Math.abs(ypp)*Math.abs(c/g)<0)  y=Long.MAX_VALUE;
        if(a<0)  x=-x;
        if(b<0)  y=-y;

        long left = (long)-5e18;
        long right = (long)5e18;

        if(c%g!=0) {
            out.println("-1");
        } else {
            if(left<=x && x<=right && left<=y && x<=right)
            out.println(x+" "+y);
            else 
            out.println("-1");
        }
         
        scan.close();
        out.close();
    }

	private final static int m =(int)1e9+7;
	private static class Pair<T,V> {
		T first;
		V second;
		Pair(final T first, final V second) {
			this.first = first;
			this.second = second;
		}
		public boolean equals(Object o) {
			Pair given = (Pair)o;
			if(given.first == first && given.second == second)  return true;
			return false;
		}
		public int hashCode() {
			long temp = (long)(first.hashCode())*31;
			temp = (temp+(long)second.hashCode())%m;
			return (int)temp;
		}
	}

    static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int snumChars;
        private SpaceCharFilter filter;

        public InputReader(final InputStream stream) {
            this.stream = stream;
        }

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

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }

            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));

            return res * sgn;
        }

        public String next() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
        
        public void close() throws IOException {
            if(stream==null) {
                return;
            }
            stream.close();
        }
    }

    public static void debug(final int[] ...var) {
        for(final int[] row : var) {
            debug(row);
        }
    }

    public static void debug(final long[] ...var) {
        for(final long[] row : var) {
            debug(row);
        }
    }

    public static void debug(final String[] ...var) {
        for(final String[] row : var) {
            debug(row);
        }
    }

    public static void debug(final double[] ...var) {
        for(final double[] row : var) {
            debug(row);
        }
    }

    public static void debug(final char[] ...var) {
        for(final char[] row : var) {
            debug(row);
        }
    }

    public static void debug(final int ...var) {
        for(final int i:var)  System.err.print(i+" ");
        System.err.println();
    }
    public static void debug(final String ...var) {
        for(final String i:var)  System.err.print(i+" ");
        System.err.println();
    }
    public static void debug(final double ...var) {
        for(final double i:var)  System.err.print(i+" ");
        System.err.println();
    }
    
    public static void debug(final long ...var) {
        for(final long i:var)  System.err.print(i+" ");
        System.err.println();
    }
    
    public static void debug(final char ...var) {
        for(final char c:var)  System.err.print(c+" ");
        System.err.println();
    }

    /*
    public static <T> void debug(T ...varargs) {
        // Warning
        // Heap Pollution might occur
        // this overrides even 1d and 2d array methods as it is an object... 
        // + i am not using object based array like Integer[]
        // I am using int[] so that is a problem as i need Wrapper class as an argument
        for(T val:varargs)  System.err.printf("%s ",val);
        System.err.println();
    }
    */
}