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 = rpp/rp;
            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();
    }
    */
}


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();
    }
    */
}


#include <bits/stdc++.h>
#define pb push_back
#define int long long
#define endl '\n'
#define all(x) (x).begin(),(x).end()
#define deb(x) cout<<#x<<"="<<x<<endl;
#define test int T;cin>>T;while(T--)
using namespace std;

const int MOD = 1e9 + 7;
const int INF = 1e9 + 9;
const int N   = 500500;

int mod(int a, int b)
{
    return a - (a / b) * b;
}

int gcd(int a, int b, int& x, int& y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    int t1, t2;
    int g = gcd(b, mod(a, b), t1, t2);
    x = t2;
    y = t1 - t2 * (a / b);
    return g;
}

signed main() {
        ios_base::sync_with_stdio(false);
        cin.tie(0);
        int a, b, c;
        cin >> a >> b >> c;
        if (a == 0) {
            if (c % b == 0) {
                cout << 1 << " " << (-c) / b;
            }
            else {
                cout << -1;
            }
            return 0;
        }
        if (b == 0) {
            if (c % a == 0) {
                cout << (-c) / a << " " << 1;
            }
            else {
                cout << -1;
            }
            return 0;
        }
        int g = __gcd(a, b);
        c = -c;
        if (c % g) {
            cout << -1;
            return 0;
        }
        int x, y;
        gcd(a, b, x, y);
        cout << x * (c / g) << " " << y * (c / g);
        return 0;
}


#include <bits/stdc++.h>
#define pb push_back
#define int long long
#define endl '\n'
#define all(x) (x).begin(),(x).end()
#define deb(x) cout<<#x<<"="<<x<<endl;
#define test int T;cin>>T;while(T--)
using namespace std;

const int MOD = 1e9 + 7;
const int INF = 1e9 + 9;
const int N   = 500500;

int gcd(int a, int b, int& x, int& y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    int t1, t2;
    int g = gcd(b, a % b, t1, t2);
    x = t2;
    y = t1 - t2 * (a / b);
    return g;
}

signed main() {
        ios_base::sync_with_stdio(false);
        cin.tie(0);
        int a, b, c;
        cin >> a >> b >> c;
        if (a == 0) {
            if (c % b == 0) {
                cout << 1 << " " << (-c) / b;
            }
            else {
                cout << -1;
            }
            return 0;
        }
        if (b == 0) {
            if (c % a == 0) {
                cout << 1 << " " << (-c) / a;
            }
            else {
                cout << -1;
            }
            return 0;
        }
        c = -c;
        int g = __gcd(abs(a), abs(b));
        if (c % g) {
            cout << -1;
            return 0;
        }
        int x, y;
        gcd(a, b, x, y);
        cout << x * (c / g) << " " << y * (c / g);
        return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

ll gcdExtended(ll a, ll b, ll *x, ll *y)
{
    if (a == 0)
    {
        *x = 0;
        *y = 1;
        return b;
    }
    ll x1, y1;
    ll gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll a, b, c; cin >> a>>b>>c;
    ll x, y;
    ll g=gcdExtended(a, b, &x, &y);
    cout << -c*x <<" "<<-c*y<<'\n';
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

ll gcdExtended(ll a, ll b, ll *x, ll *y)
{
    if (a == 0)
    {
      *x = 0;
      *y = 1;
      return b;
    }
    ll x1, y1;
    ll gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll a, b, c; cin >> a>>b>>c;
    ll x, y;
    ll g=gcdExtended(a, b, &x, &y);
    if(-c==-c/g*g){
      cout << -c*x<<" "<<-c*y;
    }
    else{
      cout<<-1;
    }
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

ll gcdExtended(ll a, ll b, ll *x, ll *y)
{
    if (a == 0)
    {
      *x = 0;
      *y = 1;
      return b;
    }
    ll x1, y1;
    ll gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll a, b, c; cin >> a>>b>>c;
    ll x, y;
    ll g=gcdExtended(a, b, &x, &y);
    // cout << g<<'\n';
    if(-c==-c/g*g){
      cout << -c/g*x<<" "<<-c/g*y;
    }
    else{
      cout<<-1;
    }
}


#include <bits/stdc++.h>
#define int long long
using namespace std;
int exgcd(int a, int b, int &x, int &y)
{
    if (b == 0)
    {
        x = 1;
        y = 0;
        return a;
    }
    int d = exgcd(b, a % b, y, x);
    y -= (a / b) * x;
    return d;
}
signed main()
{
    int a, b, c, d, x, y;
    cin >> a >> b >> c;
    d = exgcd(a, b, x, y);
    if (c % d != 0)
        cout << -1 << endl;
    else
        cout << x * (-c / d) << " " << y * (-c / d) << endl;
    return 0;
}


#include <bits/stdc++.h>
#define int long long
using namespace std;
int exgcd(int a, int b, int &x, int &y)
{
    if (b == 0)
    {
        x = 1;
        y = 0;
        return a;
    }
    int d = exgcd(b, a % b, y, x);
    y -= (a / b) * x;
    return d;
}
signed main()
{
    int a, b, c, d, x, y;
    cin >> a >> b >> c;
    d = exgcd(a, b, x, y);
    if (c % d != 0)
        cout << -1 << endl;
    else
        cout << x * (-c) << " " << y * (-c) << endl;
    return 0;
}


/*   786     */

#include <bits/stdc++.h>
using namespace std;
//typedefs
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> PII;
typedef pair<double, double> PDD;
typedef pair<LL, LL> PLL;
typedef vector<PII> VII;
typedef vector<PLL> VLL;

//#Defines
#define rep(i,a,b)	for(i=a;i<=b;i++)
#define repR(i,a,b)	for(i=a;i>=b;i--)
#define pb push_back
// #define pb emplace_back
#define F first
#define S second
#define mp make_pair
#define all(c)		c.begin(),c.end()
#define endl '\n'
#define pf(x) printf("%d",x)
#define pfl(x) printf("%lld",x)
#define sf(x) scanf("%d",&x)
#define sfl(x) scanf("%lld",&x)
#define MOD 1000000007
#define trace(x) cerr << #x << ": " << x << " " << endl;

LL gcdExtended(LL a, LL b, LL *x, LL *y)
{
    // Base Case
    if (a == 0)
    {
        *x = 0;
        *y = 1;
        return b;
    }

    LL x1, y1; // To store results of recursive call
    LL gcd = gcdExtended(b%a, a, &x1, &y1);

    // Update x and y using results of recursive
    // call
    *x = y1 - (b/a) * x1;
    *y = x1;

    return gcd;
}

main()
{
    LL i,j,k,l,m,n,a,b,c,gcd,x,y;

    cin>>a>>b>>c;

    gcd = gcdExtended(a,b,&x,&y);
   // trace(gcd);
  //  trace(x);
    //trace(y);
    if(c%gcd == 0)
    {
        cout<<-x*(c/gcd)<<" "<<-y*(c/gcd)<<endl;
    }
    else cout<<-1<<endl;

}


/*   786     */

#include <bits/stdc++.h>
using namespace std;
//typedefs
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> PII;
typedef pair<double, double> PDD;
typedef pair<LL, LL> PLL;
typedef vector<PII> VII;
typedef vector<PLL> VLL;

//#Defines
#define rep(i,a,b)	for(i=a;i<=b;i++)
#define repR(i,a,b)	for(i=a;i>=b;i--)
#define pb push_back
// #define pb emplace_back
#define F first
#define S second
#define mp make_pair
#define all(c)		c.begin(),c.end()
#define endl '\n'
#define pf(x) printf("%d",x)
#define pfl(x) printf("%lld",x)
#define sf(x) scanf("%d",&x)
#define sfl(x) scanf("%lld",&x)
#define MOD 1000000007
#define trace(x) cerr << #x << ": " << x << " " << endl;

LL gcdExtended(LL a, LL b, LL *x, LL *y)
{
    // Base Case
    if (a == 0)
    {
        *x = 0;
        *y = 1;
        return b;
    }

    LL x1, y1; // To store results of recursive call
    LL gcd = gcdExtended(b%a, a, &x1, &y1);

    // Update x and y using results of recursive
    // call
    *x = y1 - (b/a) * x1;
    *y = x1;

    return gcd;
}

main()
{
    LL i,j,k,l,m,n,a,b,c,gcd,x,y;

    cin>>a>>b>>c;

    gcd = gcdExtended(a,b,&x,&y);
   // trace(gcd);
  //  trace(x);
    //trace(y);
    if(c%gcd == 0)
    {
        cout<<-(x*c)<<" "<<-(y*c)<<endl;
    }
    else cout<<-1<<endl;

}


/*   786     */

#include <bits/stdc++.h>
using namespace std;
//typedefs
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> PII;
typedef pair<double, double> PDD;
typedef pair<LL, LL> PLL;
typedef vector<PII> VII;
typedef vector<PLL> VLL;

//#Defines
#define rep(i,a,b)	for(i=a;i<=b;i++)
#define repR(i,a,b)	for(i=a;i>=b;i--)
#define pb push_back
// #define pb emplace_back
#define F first
#define S second
#define mp make_pair
#define all(c)		c.begin(),c.end()
#define endl '\n'
#define pf(x) printf("%d",x)
#define pfl(x) printf("%lld",x)
#define sf(x) scanf("%d",&x)
#define sfl(x) scanf("%lld",&x)
#define MOD 1000000007
#define trace(x) cerr << #x << ": " << x << " " << endl;

LL gcdExtended(LL a, LL b, LL *x, LL *y)
{
    // Base Case
    if (a == 0)
    {
        *x = 0;
        *y = 1;
        return b;
    }

    LL x1, y1; // To store results of recursive call
    LL gcd = gcdExtended(b%a, a, &x1, &y1);

    // Update x and y using results of recursive
    // call
    *x = y1 - (b/a) * x1;
    *y = x1;

    return gcd;
}

main()
{
    LL i,j,k,l,m,n,a,b,c,gcd,x,y;

    cin>>a>>b>>c;

    gcd = gcdExtended(a,b,&x,&y);
   // trace(gcd);
    //trace(x);
    //trace(y);
    if(c%gcd == 0)
    {
        cout<<x*c<<" "<<y*c<<endl;
    }
    else cout<<-1<<endl;

}


#include<stdio.h>
#include<iostream>
#include<cmath>
#include<string>
#include<map>
#include<vector>
#include<cstring>
#include<algorithm>
#include<set>
using namespace std;
set<int>st[55];
int x,y,c;
int exgcd(int a,int b)
{
    if(b==0)
    {
        x=1;
        y=0;
        return a;
    }
    int r=exgcd(b,a%b);
    int t=x;
    x=y;
    y=t-a/b*y;
    return r;
}
int main()
{
    int a,b,d,flag=1,flag1=1;
    cin>>a>>b>>c;
    c=-c;
    if(a<0)
        flag*=-1;
    if(b<0)
        flag1*=-1;
    d=exgcd(abs(a),abs(b));
    if(abs(c)%d==0)
        cout<<x*c/d*flag<<' '<<y*c/d*flag1<<endl;
    else
        cout<<'-1'<<endl;
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<cmath>
#include<string>
#include<map>
#include<vector>
#include<cstring>
#include<algorithm>
#include<set>
using namespace std;
set<int>st[55];
int x,y,c;
int exgcd(int a,int b)
{
    if(b==0)
    {
        x=1;
        y=0;
        return a;
    }
    int r=exgcd(b,a%b);
    int t=x;
    x=y;
    y=t-a/b*y;
    return r;
}
int main()
{
    int a,b,d,flag=1,flag1=1;
    cin>>a>>b>>c;
    c=-c;
    d=exgcd(a,b);
    if(abs(c)%d==0)
        cout<<x*c/d<<' '<<y*c/d<<endl;
    else
        cout<<'-1'<<endl;
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<cmath>
#include<string>
#include<map>
#include<vector>
#include<cstring>
#include<algorithm>
#include<set>
using namespace std;
long long x,y,c;
long long exgcd(long long a,long long b)
{
    if(b==0)
    {
        x=1;
        y=0;
        return a;
    }
    long long r=exgcd(b,a%b);
    long long t=x;
    x=y;
    y=t-a/b*y;
    return r;
}
int main()
{
    long long a,b,d;
    cin>>a>>b>>c;
    c=-c;
    d=exgcd(a,b);
    if(c%d==0)
        cout<<x*(c/d)<<' '<<y*(c/d)<<endl;
    else
        cout<<'-1'<<endl;
    return 0;
}


#include <iostream>
#include <vector>

using namespace std;

typedef long long ll;

ll gcd(ll a, ll b, ll &x, ll &y) {
  if (a % b == 0) {
    x = 1;
    y = 1 - (a / b);
    return b;
  }
  ll x1, y1;
  ll g = gcd(b, a % b, x1, y1);
  x = y1;
  y = x1 - (a / b) * y1;
  return g;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll a, b, c, x, y;
  cin >> a >> b >> c;
  ll g = gcd(a, b, x, y);
  if (c % g) {
    cout << -1;
    return 0;
  }
  c = -c;
  x *= (c / g), y *= (c / g);
  x = (x % (b / g) + (b / g)) % (b / g);
  y = (c - a * x) / b;
  cout << x << ' ' << y;
  return 0;
}


#include <iostream>
#include <vector>

using namespace std;

typedef long long ll;

ll gcd(ll a, ll b, ll &x, ll &y) {
  if (a % b == 0) {
    x = 1;
    y = 1 - (a / b);
    return b;
  }
  ll x1, y1;
  ll g = gcd(b, a % b, x1, y1);
  x = y1;
  y = x1 - (a / b) * y1;
  return g;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll a, b, c, x, y;
  cin >> a >> b >> c;
  if (b == 0)
    swap(a, b);
  ll g = gcd(a, b, x, y);
  if (c % g) {
    cout << -1;
    return 0;
  }
  c = -c;
  x *= (c / g), y *= (c / g);
  x = (x % (b / g) + (b / g)) % (b / g);
  y = (c - a * x) / b;
  cout << x << ' ' << y;
  return 0;
}


#include<bits/stdc++.h>
using namespace std;

int exgcd(int a, int b, int & x, int & y) {
  if (b == 0) {
    x = 1, y = 0;
    return a;
  }
  int x0, y0, g = exgcd(b, a % b, x0, y0);
  x = y0, y = x0 - a / b * y0;
  return g;
}

int main() {
  ios_base::sync_with_stdio(0); cin.tie(NULL);
  int A, B, C;
  cin >> A >> B >> C;
  C = - C;
  int x, y, g = exgcd(A, B, x, y);
  if (C % g == 0) {
    int c = C / g;
    cout << x * c << ' ' << y * c << '\n';
  } else {
    cout << -1;
  }
  return 0;
}


#include<bits/stdc++.h>
using namespace std;

int exgcd(int a, int b, int & x, int & y) {
  if (b == 0) {
    x = 1, y = 0;
    return a;
  }
  int x0, y0, g = exgcd(b, a % b, x0, y0);
  x = y0, y = x0 - a / b * y0;
  return g;
}

int main() {
  ios_base::sync_with_stdio(0); cin.tie(NULL);
  int A, B, C;
  cin >> A >> B >> C;
  C = - C;
  int x, y, g = exgcd(A, B, x, y);
  int c = C / g;
  cout << x * c << ' ' << y * c << '\n';
  return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

ll exgcd(ll a, ll b, ll & x, ll & y) {
  if (b == 0) {
    x = 1, y = 0;
    return a;
  }
  ll x0, y0, g = exgcd(b, a % b, x0, y0);
  x = y0, y = x0 - a / b * y0;
  return g;
}

int main() {
  ios_base::sync_with_stdio(0); cin.tie(NULL);
  ll A, B, C;
  cin >> A >> B >> C;
  C = - C;
  ll x, y, g = exgcd(A, B, x, y);
  if (C % g == 0) {
    ll c = C / g;
    cout << x * c << ' ' << y * c << '\n';
  } else {
    cout << -1;
  }
  return 0;
}


/*/ Author: kal013 /*/
// #pragma GCC optimize ("O3")
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
using namespace std;
using namespace __gnu_pbds;

template<class T>
using ordered_set = tree<T, null_type,less<T>, rb_tree_tag,tree_order_statistics_node_update> ;

template<class key, class value, class cmp = std::less<key>>
using ordered_map = tree<key, value, cmp, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;

template<class T>
using min_heap = priority_queue<T,vector<T>,greater<T> >;

struct custom_hash { // Credits: https://codeforces.com/blog/entry/62393
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
    size_t operator()(pair<int64_t,int64_t> Y) const{
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(Y.first * 31 + Y.second + FIXED_RANDOM);
    }
};

template<class T> ostream& operator<<(ostream &os, vector<T> V) {
    os << "[ ";
    for(auto v : V) os << v << " ";
    return os << "]";
}
template<class T> istream& operator>>(istream &is, vector<T>& V) {
    for(auto &e : V)
        is >> e;
    return is;
}

#ifdef __SIZEOF_INT128__
ostream& operator << (ostream &os, __int128 T){
    const static long long N = (1'000'000'000'000'000'000);
    if (T < 0){
        os << '-';
        T *= -1;
    }

    unsigned long long b = T%N;
    T /= N;
    if (T == 0)
        return os << b ;
    unsigned long long a = T % N;
    T /= N;
    if (T == 0){
        os << a;
        __int128 mul = 10;
        int cnt = 0;
        while( mul*b < N && cnt < 17){
            os << '0';
            mul *= 10;
            ++cnt;
        }
        return os << b;
    }
    os << ((long long) T);

     __int128 mul = 10;
      int cnt = 0;
    while( mul*a < N && cnt < 17){
        os << '0';
        mul *= 10;
        ++cnt;
    }
    os << a;
    mul = 10;
    cnt = 0;
    while( mul*b < N && cnt < 17){
        os << '0';
        mul *= 10;
        ++cnt;
    }
    return os << b;

}
istream& operator >> (istream& is, __int128& T){
    string U;
    is >> U;
    T = 0;
    size_t pos = 0;
    int mul = 1;
    if (U[pos] == '-'){
        ++pos;
        mul *= -1;
    }
    for(; pos < U.size(); ++pos){
        T *= 10;
        T += (U[pos] - '0');
    }
    T *= mul;

    return is;
}
#endif
template<class T> ostream& operator<<(ostream &os, set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator<<(ostream &os, unordered_set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator << (ostream& os, multiset<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator<<(ostream &os, ordered_set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
    return os << "(" << P.first << "," << P.second << ")";
}
template<class L, class R> ostream& operator<<(ostream &os, map<L,R> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}
template<class L, class R, class chash = std::hash<R>> ostream& operator<<(ostream &os, unordered_map<L,R,chash> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}
template<class L, class R, class chash = std::hash<R> > ostream& operator<<(ostream &os, gp_hash_table<L,R,chash> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}

#define TRACE
#ifdef TRACE
    #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1){
        cerr << name << " : " << arg1 << endl;
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args){
        const char* comma = strchr(names + 1, ',');
        cerr.write(names, comma - names) << " : " << arg1<<" | ";
        __f(comma+1, args...);
    }
#else
    #define trace(...) 1
#endif

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

inline int64_t random_long(long long l,long long r){
    uniform_int_distribution<int64_t> generator(l,r);
    return generator(rng);
}
inline int64_t random_long(){
    uniform_int_distribution<int64_t> generator(LLONG_MIN,LLONG_MAX);
    return generator(rng);
}

/*/---------------------------Defines----------------------/*/
typedef vector<int> vi;
typedef pair<int,int> pii;

#define For(i,n) for(int i = 0; i < (int) n; ++i)
#define Rep(i,n) for(int i = 1; i <= (int) n; ++i)
#define ll long long
#define F first
#define S second
#define pb push_back
#define endl "\n"
#define all(v) (v).begin(),(v).end()
/*/-----------------------Modular Arithmetic---------------/*/

const int mod=1e9+7;

/*/-----------------------------Code begins----------------------------------/*/

struct ex_gcd{ ll x,y,d;
	ex_gcd(ll x,ll y,ll d): x(x),y(y),d(d){}  };
ex_gcd gcd(ll a,ll b){if(b==0) return ex_gcd(1,0,a);
	ex_gcd c=gcd(b,a%b);
	return ex_gcd(c.y,c.x-(a/b)*c.y,c.d); }

const ll LIM = 5e18;

void solve(){
	ll A, B, C;
	cin >> A >> B >> C;

	ex_gcd V = gcd(abs(A), abs(B));
	ll gg = V.d;
	C = -C;
	if ((C % gg) != 0){
		cout << -1 << endl;
		return;
	}

	ll mulA = (A < 0) ? -1 : 1;
	ll mulB = (B < 0) ? -1 : 1;

	if (A == 0){
		ll y1 = C / B;
		if (abs(y1) <= LIM){
			cout << 0 << " " << y1 << endl;
		}
		else{
			cout << -1 << endl;
		}
		return;
	}

	if (B == 0){
		ll x1 = C / A;
		if (abs(x1) <= LIM){
			cout << x1 << " " << 0 << endl;
		}
		else{
			cout << -1 << endl;
		}
		return;
	}

	A = abs(A);
	B = abs(B);

	ll x1 = V.x, y1 = V.y;
	x1 *= (C / gg);
	y1 *= (C / gg);

	x1 *= mulA;
	y1 *= mulB;
	ll mv_x = (B  / gg);
	ll mv_y = (A / gg);
	assert((A * x1 * mulA + B * y1 * mulB)  == C);

	if (abs(x1) <= LIM && abs(y1) <= LIM){
		cout << x1 << " " << y1 <<  endl;
		return;
	}

	// if(y1 > LIM){
	// 	ll tmp = (y1 - LIM + mv_y - 1) / mv_y;
	// 	y1 -= mv_y * tmp;
	// 	x1 += mv_x * tmp;
	// }

	// assert(y1 <= LIM);

	// if (y1 < -LIM){
	// 	ll tmp = - LIM - y1;
	// 	assert(tmp > 0);
	// 	tmp = (tmp + mv_y - 1) / mv_y;
	// 	y1 += mv_y * tmp;
	// 	x1 -= mv_x * tmp;
	// }
	// assert(y1 >= -LIM);

	// if (abs(x1) <= LIM && abs(y1) <= LIM){
	// 	cout << x1 << " " << y1 <<  endl;
	// 	return;
	// }

	cout << -1 << endl;

}
int main(){
    // Use "set_name".max_load_factor(0.25);"set_name".reserve(512); with unordered set
    // Or use gp_hash_table<X,null_type>
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    cout<<fixed<<setprecision(25);
    cerr<<fixed<<setprecision(10);
    auto start = std::chrono::high_resolution_clock::now();
    int t=1;
    //cin >> t;
    while(t--) {
        solve();
    }
    auto stop = std::chrono::high_resolution_clock::now();
    auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(stop - start);

    // cerr << "Time taken : " << ((long double)duration.count())/((long double) 1e9) <<"s "<< endl;
}


/*/ Author: kal013 /*/
// #pragma GCC optimize ("O3")
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
using namespace std;
using namespace __gnu_pbds;

template<class T>
using ordered_set = tree<T, null_type,less<T>, rb_tree_tag,tree_order_statistics_node_update> ;

template<class key, class value, class cmp = std::less<key>>
using ordered_map = tree<key, value, cmp, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;

template<class T>
using min_heap = priority_queue<T,vector<T>,greater<T> >;

struct custom_hash { // Credits: https://codeforces.com/blog/entry/62393
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
    size_t operator()(pair<int64_t,int64_t> Y) const{
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(Y.first * 31 + Y.second + FIXED_RANDOM);
    }
};

template<class T> ostream& operator<<(ostream &os, vector<T> V) {
    os << "[ ";
    for(auto v : V) os << v << " ";
    return os << "]";
}
template<class T> istream& operator>>(istream &is, vector<T>& V) {
    for(auto &e : V)
        is >> e;
    return is;
}

#ifdef __SIZEOF_INT128__
ostream& operator << (ostream &os, __int128 T){
    const static long long N = (1'000'000'000'000'000'000);
    if (T < 0){
        os << '-';
        T *= -1;
    }

    unsigned long long b = T%N;
    T /= N;
    if (T == 0)
        return os << b ;
    unsigned long long a = T % N;
    T /= N;
    if (T == 0){
        os << a;
        __int128 mul = 10;
        int cnt = 0;
        while( mul*b < N && cnt < 17){
            os << '0';
            mul *= 10;
            ++cnt;
        }
        return os << b;
    }
    os << ((long long) T);

     __int128 mul = 10;
      int cnt = 0;
    while( mul*a < N && cnt < 17){
        os << '0';
        mul *= 10;
        ++cnt;
    }
    os << a;
    mul = 10;
    cnt = 0;
    while( mul*b < N && cnt < 17){
        os << '0';
        mul *= 10;
        ++cnt;
    }
    return os << b;

}
istream& operator >> (istream& is, __int128& T){
    string U;
    is >> U;
    T = 0;
    size_t pos = 0;
    int mul = 1;
    if (U[pos] == '-'){
        ++pos;
        mul *= -1;
    }
    for(; pos < U.size(); ++pos){
        T *= 10;
        T += (U[pos] - '0');
    }
    T *= mul;

    return is;
}
#endif
template<class T> ostream& operator<<(ostream &os, set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator<<(ostream &os, unordered_set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator << (ostream& os, multiset<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator<<(ostream &os, ordered_set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
    return os << "(" << P.first << "," << P.second << ")";
}
template<class L, class R> ostream& operator<<(ostream &os, map<L,R> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}
template<class L, class R, class chash = std::hash<R>> ostream& operator<<(ostream &os, unordered_map<L,R,chash> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}
template<class L, class R, class chash = std::hash<R> > ostream& operator<<(ostream &os, gp_hash_table<L,R,chash> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}

#define TRACE
#ifdef TRACE
    #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1){
        cerr << name << " : " << arg1 << endl;
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args){
        const char* comma = strchr(names + 1, ',');
        cerr.write(names, comma - names) << " : " << arg1<<" | ";
        __f(comma+1, args...);
    }
#else
    #define trace(...) 1
#endif

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

inline int64_t random_long(long long l,long long r){
    uniform_int_distribution<int64_t> generator(l,r);
    return generator(rng);
}
inline int64_t random_long(){
    uniform_int_distribution<int64_t> generator(LLONG_MIN,LLONG_MAX);
    return generator(rng);
}

/*/---------------------------Defines----------------------/*/
typedef vector<int> vi;
typedef pair<int,int> pii;

#define For(i,n) for(int i = 0; i < (int) n; ++i)
#define Rep(i,n) for(int i = 1; i <= (int) n; ++i)
#define ll long long
#define F first
#define S second
#define pb push_back
#define endl "\n"
#define all(v) (v).begin(),(v).end()
/*/-----------------------Modular Arithmetic---------------/*/

const int mod=1e9+7;

/*/-----------------------------Code begins----------------------------------/*/

struct ex_gcd{ ll x,y,d;
	ex_gcd(ll x,ll y,ll d): x(x),y(y),d(d){}  };
ex_gcd gcd(ll a,ll b){if(b==0) return ex_gcd(1,0,a);
	ex_gcd c=gcd(b,a%b);
	return ex_gcd(c.y,c.x-(a/b)*c.y,c.d); }

const ll LIM = 5e8;

void solve(){
	ll A, B, C;
	cin >> A >> B >> C;

	ex_gcd V = gcd(abs(A), abs(B));
	ll gg = V.d;
	C = -C;
	if ((C % gg) != 0){
		cout << -1 << endl;
		return;
	}

	ll mulA = (A < 0) ? -1 : 1;
	ll mulB = (B < 0) ? -1 : 1;
	A = abs(A);
	B = abs(B);

	ll x1 = V.x, y1 = V.y;
	x1 *= (C / gg);
	y1 *= (C / gg);

	ll mv_x = (B  / gg);
	ll mv_y = (A / gg);

	if (abs(x1) <= LIM && abs(y1) <= LIM){
		cout << x1 * mulA << " " << y1 * mulB <<  endl;
		return;
	}

	while(y1 > LIM){
		ll tmp = (y1 - LIM + mv_y - 1) / mv_y;
		y1 -= mv_y * tmp;
		x1 += mv_x * tmp;
	}

	while(y1 < -LIM){
		ll tmp = - LIM - y1;
		tmp = (tmp + mv_y - 1) / mv_y;
		y1 += mv_y * tmp;
		x1 -= mv_x * tmp;
	}

	if (abs(x1) <= LIM && abs(y1) <= LIM){
		cout << x1 * mulA << " " << y1 * mulB <<  endl;
		return;
	}

}
int main(){
    // Use "set_name".max_load_factor(0.25);"set_name".reserve(512); with unordered set
    // Or use gp_hash_table<X,null_type>
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    cout<<fixed<<setprecision(25);
    cerr<<fixed<<setprecision(10);
    auto start = std::chrono::high_resolution_clock::now();
    int t=1;
    //cin >> t;
    while(t--) {
        solve();
    }
    auto stop = std::chrono::high_resolution_clock::now();
    auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(stop - start);

    // cerr << "Time taken : " << ((long double)duration.count())/((long double) 1e9) <<"s "<< endl;
}


/*/ Author: kal013 /*/
// #pragma GCC optimize ("O3")
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
using namespace std;
using namespace __gnu_pbds;

template<class T>
using ordered_set = tree<T, null_type,less<T>, rb_tree_tag,tree_order_statistics_node_update> ;

template<class key, class value, class cmp = std::less<key>>
using ordered_map = tree<key, value, cmp, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;

template<class T>
using min_heap = priority_queue<T,vector<T>,greater<T> >;

struct custom_hash { // Credits: https://codeforces.com/blog/entry/62393
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
    size_t operator()(pair<int64_t,int64_t> Y) const{
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(Y.first * 31 + Y.second + FIXED_RANDOM);
    }
};

template<class T> ostream& operator<<(ostream &os, vector<T> V) {
    os << "[ ";
    for(auto v : V) os << v << " ";
    return os << "]";
}
template<class T> istream& operator>>(istream &is, vector<T>& V) {
    for(auto &e : V)
        is >> e;
    return is;
}

#ifdef __SIZEOF_INT128__
ostream& operator << (ostream &os, __int128 T){
    const static long long N = (1'000'000'000'000'000'000);
    if (T < 0){
        os << '-';
        T *= -1;
    }

    unsigned long long b = T%N;
    T /= N;
    if (T == 0)
        return os << b ;
    unsigned long long a = T % N;
    T /= N;
    if (T == 0){
        os << a;
        __int128 mul = 10;
        int cnt = 0;
        while( mul*b < N && cnt < 17){
            os << '0';
            mul *= 10;
            ++cnt;
        }
        return os << b;
    }
    os << ((long long) T);

     __int128 mul = 10;
      int cnt = 0;
    while( mul*a < N && cnt < 17){
        os << '0';
        mul *= 10;
        ++cnt;
    }
    os << a;
    mul = 10;
    cnt = 0;
    while( mul*b < N && cnt < 17){
        os << '0';
        mul *= 10;
        ++cnt;
    }
    return os << b;

}
istream& operator >> (istream& is, __int128& T){
    string U;
    is >> U;
    T = 0;
    size_t pos = 0;
    int mul = 1;
    if (U[pos] == '-'){
        ++pos;
        mul *= -1;
    }
    for(; pos < U.size(); ++pos){
        T *= 10;
        T += (U[pos] - '0');
    }
    T *= mul;

    return is;
}
#endif
template<class T> ostream& operator<<(ostream &os, set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator<<(ostream &os, unordered_set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator << (ostream& os, multiset<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator<<(ostream &os, ordered_set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
    return os << "(" << P.first << "," << P.second << ")";
}
template<class L, class R> ostream& operator<<(ostream &os, map<L,R> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}
template<class L, class R, class chash = std::hash<R>> ostream& operator<<(ostream &os, unordered_map<L,R,chash> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}
template<class L, class R, class chash = std::hash<R> > ostream& operator<<(ostream &os, gp_hash_table<L,R,chash> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}

#define TRACE
#ifdef TRACE
    #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1){
        cerr << name << " : " << arg1 << endl;
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args){
        const char* comma = strchr(names + 1, ',');
        cerr.write(names, comma - names) << " : " << arg1<<" | ";
        __f(comma+1, args...);
    }
#else
    #define trace(...) 1
#endif

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

inline int64_t random_long(long long l,long long r){
    uniform_int_distribution<int64_t> generator(l,r);
    return generator(rng);
}
inline int64_t random_long(){
    uniform_int_distribution<int64_t> generator(LLONG_MIN,LLONG_MAX);
    return generator(rng);
}

/*/---------------------------Defines----------------------/*/
typedef vector<int> vi;
typedef pair<int,int> pii;

#define For(i,n) for(int i = 0; i < (int) n; ++i)
#define Rep(i,n) for(int i = 1; i <= (int) n; ++i)
#define ll long long
#define F first
#define S second
#define pb push_back
#define endl "\n"
#define all(v) (v).begin(),(v).end()
/*/-----------------------Modular Arithmetic---------------/*/

const int mod=1e9+7;

/*/-----------------------------Code begins----------------------------------/*/

struct ex_gcd{ ll x,y,d;
	ex_gcd(ll x,ll y,ll d): x(x),y(y),d(d){}  };
ex_gcd gcd(ll a,ll b){if(b==0) return ex_gcd(1,0,a);
	ex_gcd c=gcd(b,a%b);
	return ex_gcd(c.y,c.x-(a/b)*c.y,c.d); }

const ll LIM = 5e18;

void solve(){
	ll A, B, C;
	cin >> A >> B >> C;

	ex_gcd V = gcd(abs(A), abs(B));
	ll gg = V.d;
	C = -C;
	if ((C % gg) != 0){
		cout << -1 << endl;
		return;
	}

	ll mulA = (A < 0) ? -1 : 1;
	ll mulB = (B < 0) ? -1 : 1;
	A = abs(A);
	B = abs(B);

	if (A == 0){
		ll y1 = C / B;
		if (abs(y1) <= LIM){
			cout << 0 << " " << y1 << endl;
		}
		else{
			cout << -1 << endl;
		}
		return;
	}

	if (B == 0){
		ll x1 = C / A;
		if (abs(x1) <= LIM){
			cout << x1 << " " << 0 << endl;
		}
		else{
			cout << -1 << endl;
		}
		return;
	}

	ll x1 = V.x, y1 = V.y;
	x1 *= (C / gg);
	y1 *= (C / gg);

	x1 *= mulA;
	y1 *= mulB;
	ll mv_x = (B  / gg);
	ll mv_y = (A / gg);

	if (abs(x1) <= LIM && abs(y1) <= LIM){
		cout << x1 << " " << y1 <<  endl;
		return;
	}

	if(y1 > LIM){
		ll tmp = (y1 - LIM + mv_y - 1) / mv_y;
		y1 -= mv_y * tmp;
		x1 += mv_x * tmp;
	}

	assert(y1 <= LIM);

	if (y1 < -LIM){
		ll tmp = - LIM - y1;
		assert(tmp > 0);
		tmp = (tmp + mv_y - 1) / mv_y;
		y1 += mv_y * tmp;
		x1 -= mv_x * tmp;
	}
	assert(y1 >= -LIM);

	if (abs(x1) <= LIM && abs(y1) <= LIM){
		cout << x1 << " " << y1 <<  endl;
		return;
	}

	cout << -1 << endl;

}
int main(){
    // Use "set_name".max_load_factor(0.25);"set_name".reserve(512); with unordered set
    // Or use gp_hash_table<X,null_type>
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    cout<<fixed<<setprecision(25);
    cerr<<fixed<<setprecision(10);
    auto start = std::chrono::high_resolution_clock::now();
    int t=1;
    //cin >> t;
    while(t--) {
        solve();
    }
    auto stop = std::chrono::high_resolution_clock::now();
    auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(stop - start);

    // cerr << "Time taken : " << ((long double)duration.count())/((long double) 1e9) <<"s "<< endl;
}


/*/ Author: kal013 /*/
// #pragma GCC optimize ("O3")
#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
using namespace std;
using namespace __gnu_pbds;

template<class T>
using ordered_set = tree<T, null_type,less<T>, rb_tree_tag,tree_order_statistics_node_update> ;

template<class key, class value, class cmp = std::less<key>>
using ordered_map = tree<key, value, cmp, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;

template<class T>
using min_heap = priority_queue<T,vector<T>,greater<T> >;

struct custom_hash { // Credits: https://codeforces.com/blog/entry/62393
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
    size_t operator()(pair<int64_t,int64_t> Y) const{
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(Y.first * 31 + Y.second + FIXED_RANDOM);
    }
};

template<class T> ostream& operator<<(ostream &os, vector<T> V) {
    os << "[ ";
    for(auto v : V) os << v << " ";
    return os << "]";
}
template<class T> istream& operator>>(istream &is, vector<T>& V) {
    for(auto &e : V)
        is >> e;
    return is;
}

#ifdef __SIZEOF_INT128__
ostream& operator << (ostream &os, __int128 T){
    const static long long N = (1'000'000'000'000'000'000);
    if (T < 0){
        os << '-';
        T *= -1;
    }

    unsigned long long b = T%N;
    T /= N;
    if (T == 0)
        return os << b ;
    unsigned long long a = T % N;
    T /= N;
    if (T == 0){
        os << a;
        __int128 mul = 10;
        int cnt = 0;
        while( mul*b < N && cnt < 17){
            os << '0';
            mul *= 10;
            ++cnt;
        }
        return os << b;
    }
    os << ((long long) T);

     __int128 mul = 10;
      int cnt = 0;
    while( mul*a < N && cnt < 17){
        os << '0';
        mul *= 10;
        ++cnt;
    }
    os << a;
    mul = 10;
    cnt = 0;
    while( mul*b < N && cnt < 17){
        os << '0';
        mul *= 10;
        ++cnt;
    }
    return os << b;

}
istream& operator >> (istream& is, __int128& T){
    string U;
    is >> U;
    T = 0;
    size_t pos = 0;
    int mul = 1;
    if (U[pos] == '-'){
        ++pos;
        mul *= -1;
    }
    for(; pos < U.size(); ++pos){
        T *= 10;
        T += (U[pos] - '0');
    }
    T *= mul;

    return is;
}
#endif
template<class T> ostream& operator<<(ostream &os, set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator<<(ostream &os, unordered_set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator << (ostream& os, multiset<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class T> ostream& operator<<(ostream &os, ordered_set<T> S){
    os << "{ ";
    for(auto s:S) os<<s<<" ";
    return os<<"}";
}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
    return os << "(" << P.first << "," << P.second << ")";
}
template<class L, class R> ostream& operator<<(ostream &os, map<L,R> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}
template<class L, class R, class chash = std::hash<R>> ostream& operator<<(ostream &os, unordered_map<L,R,chash> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}
template<class L, class R, class chash = std::hash<R> > ostream& operator<<(ostream &os, gp_hash_table<L,R,chash> M) {
    os << "{ ";
    for(auto m:M) os<<"("<<m.first<<":"<<m.second<<") ";
    return os<<"}";
}

#define TRACE
#ifdef TRACE
    #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1){
        cerr << name << " : " << arg1 << endl;
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args){
        const char* comma = strchr(names + 1, ',');
        cerr.write(names, comma - names) << " : " << arg1<<" | ";
        __f(comma+1, args...);
    }
#else
    #define trace(...) 1
#endif

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

inline int64_t random_long(long long l,long long r){
    uniform_int_distribution<int64_t> generator(l,r);
    return generator(rng);
}
inline int64_t random_long(){
    uniform_int_distribution<int64_t> generator(LLONG_MIN,LLONG_MAX);
    return generator(rng);
}

/*/---------------------------Defines----------------------/*/
typedef vector<int> vi;
typedef pair<int,int> pii;

#define For(i,n) for(int i = 0; i < (int) n; ++i)
#define Rep(i,n) for(int i = 1; i <= (int) n; ++i)
#define ll long long
#define F first
#define S second
#define pb push_back
#define endl "\n"
#define all(v) (v).begin(),(v).end()
/*/-----------------------Modular Arithmetic---------------/*/

const int mod=1e9+7;

/*/-----------------------------Code begins----------------------------------/*/

struct ex_gcd{ ll x,y,d;
	ex_gcd(ll x,ll y,ll d): x(x),y(y),d(d){}  };
ex_gcd gcd(ll a,ll b){if(b==0) return ex_gcd(1,0,a);
	ex_gcd c=gcd(b,a%b);
	return ex_gcd(c.y,c.x-(a/b)*c.y,c.d); }

const ll LIM = 5e18;

void solve(){
	ll A, B, C;
	cin >> A >> B >> C;

	ex_gcd V = gcd(abs(A), abs(B));
	ll gg = V.d;
	C = -C;
	if ((C % gg) != 0){
		cout << -1 << endl;
		return;
	}

	ll mulA = (A < 0) ? -1 : 1;
	ll mulB = (B < 0) ? -1 : 1;

	if (A == 0){
		ll y1 = C / B;
		if (abs(y1) <= LIM){
			cout << 0 << " " << y1 << endl;
		}
		else{
			cout << -1 << endl;
		}
		return;
	}

	if (B == 0){
		ll x1 = C / A;
		if (abs(x1) <= LIM){
			cout << x1 << " " << 0 << endl;
		}
		else{
			cout << -1 << endl;
		}
		return;
	}

	A = abs(A);
	B = abs(B);

	ll x1 = V.x, y1 = V.y;
	x1 *= (C / gg);
	y1 *= (C / gg);

	x1 *= mulA;
	y1 *= mulB;
	ll mv_x = (B  / gg);
	ll mv_y = (A / gg);
	assert((A * x1 * mulA + B * y1 * mulB)  == C);

	if (abs(x1) <= LIM && abs(y1) <= LIM){
		cout << x1 << " " << y1 <<  endl;
		return;
	}

	if(y1 > LIM){
		ll tmp = (y1 - LIM + mv_y - 1) / mv_y;
		y1 -= mv_y * tmp;
		x1 += mv_x * tmp;
	}

	assert(y1 <= LIM);

	if (y1 < -LIM){
		ll tmp = - LIM - y1;
		assert(tmp > 0);
		tmp = (tmp + mv_y - 1) / mv_y;
		y1 += mv_y * tmp;
		x1 -= mv_x * tmp;
	}
	assert(y1 >= -LIM);

	if (abs(x1) <= LIM && abs(y1) <= LIM){
		cout << x1 << " " << y1 <<  endl;
		return;
	}

	cout << -1 << endl;

}
int main(){
    // Use "set_name".max_load_factor(0.25);"set_name".reserve(512); with unordered set
    // Or use gp_hash_table<X,null_type>
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    cout<<fixed<<setprecision(25);
    cerr<<fixed<<setprecision(10);
    auto start = std::chrono::high_resolution_clock::now();
    int t=1;
    //cin >> t;
    while(t--) {
        solve();
    }
    auto stop = std::chrono::high_resolution_clock::now();
    auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(stop - start);

    // cerr << "Time taken : " << ((long double)duration.count())/((long double) 1e9) <<"s "<< endl;
}


//InHisName
#include<bits/stdc++.h>
using namespace std;
const long long MOD=1000000007;
long long dp1[2001][2001],dp2[2001][2001],n,m,tc,to,dif,madif;
string s;
int main(){
	ios_base::sync_with_stdio(false);
	cin>>n>>m>>s;
	for(int i=0;i<s.size();i++){
		if(s[i]=='(')
			to++,
			dif--;
		else tc++,dif++;
		madif=max(madif,dif);
	}
	if(to>n/2||tc>n/2||n-m<madif) return cout<<0, 0;
	if(n==m) return cout<<1<<endl, 0;
	for(int i=0;i<=n-m;i++){
		dp1[i][0]=1;
		for(int j=1;j<=i;j++)
			dp1[i][j]=(dp1[i-1][j]+dp1[i][j-1])%MOD;
	}
	for(int i=0;i<=n-m;i++)
		for(int j=0;j<=n-m;j++)
			if(i<j||i-j<madif)
				dp1[i][j]=0;
	for(int i=0;i+to<=n/2;i++){
		dp2[i][0]=1;
		dp2[0][0]=0;
		if(i>1)dp2[i][0]+=dp1[i-1][0];
		for(int j=1;j+tc<=i+to;j++){
			dp2[i][j]=(dp2[i][j-1]+dp1[i][j-1])%MOD;
			if(i>0) dp2[i][j]=(dp2[i][j]+dp1[i-1][j]+dp2[i-1][j])%MOD;
		}
	}
	cout<<dp2[n/2-to][n/2-tc]%MOD;
	return -0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) ((int) (x.size()))
//#define dbg cout

const int N=2005;
const ll M=(ll)1e9+7;
ll dp[N][N], sum[N][N]; /*dp[i][j]: number of ways to build string p with i opening brackets and j closing bracketss with this condition:
for any prefix of p, the number of openings is >= the number of closings (and also i>=j)\
after setting number of openings (=i) and closings (=j) for p, the number of openings (=i2) and closings (=j2) for q is known too.

******************IMPORTANT************************: valid sequences are also valid when iterating from the end and changing opening and closing brackets into the other. (let's call this reverse)

so to count the number of ways to form q, we look at its reverse and the number will be: dp[j2][i2]
*/

int main()
{
	ios::sync_with_stdio(0);
//	cin.tie(0);
//	freopen("in.txt","r",stdin);
//	freopen("out.txt","w",stdout);
a:
	int n, m; cin >> n >> m;
	int a=0, b=0;
	for(int i=0; i<m; i++)
	{
		char ch; cin >> ch;
		if(ch=='(') a++;
		else b++;
	}
	int a2=a, b2=b;
	a=n/2-a; b=n/2-b;
	if(n%2 or n<m or a<0 or b<0)
	{
		cout << "0\n";
		return 0;
	}
	for(int i=0; i<N; i++) for(int j=0; j<N; j++) dp[i][j]=sum[i][j]=0LL;
	//init
	dp[0][0]=1LL;
	for(int j=0; j<=b; j++) sum[0][j]=1LL;
	//main
	for(int i=1; i<=max(a,b); i++) for(int j=0; j<=max(a,b); j++)
	{
		if(j>i) dp[i][j]=0LL;
		else dp[i][j]=sum[i-1][j];
		dp[i][j]%=M;
		sum[i][j]=dp[i][j]+((j)? sum[i][j-1]:0LL);
		sum[i][j]%=M;
	}
	//ans
	ll ans=0LL;
	for(int i=0; i<=a; i++) //number of openings in p
	{
		for(int j=0; j<=b; j++) //number of closings in p
		{
			int i2=a-i, j2=b-j;
			if(i+a2<j+b2) continue;
			ll nump=dp[i][j], numq=dp[j2][i2];
//			dbg << i << ',' << j << ':' << dp[i][j] << "  *  " << i2 << ',' << j2 << ':' << dp[j2][i2] << '\n';
			ans+=((nump*numq)%M);
			ans%=M;
		}
	}
//	for(int i=0; i<=a; i++)
//	{
//		for(int j=0; j<=b; j++) dbg << dp[i][j] << ' ';
//		dbg << '\n';
//	}
	cout << ans << '\n';
//	goto a;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) ((int) (x.size()))
//#define dbg cout

//*********IMPORTANT*********: valid sequences are also valid when iterating from the end and changing opening and closing brackets into each other.
const int N=2005;
const ll M=(ll)1e9+7;
ll dp[N+5][N+5];

int main()
{
	ios::sync_with_stdio(0);
//	cin.tie(0);
//	freopen("in.txt","r",stdin);
//	freopen("out.txt","w",stdout);
a:
	int n, m; cin >> n >> m;
	int a=0, b=0, minbal=0;
	for(int i=0; i<m; i++)
	{
		char ch; cin >> ch;
		if(ch=='(') a++;
		else b++;
		minbal=min(minbal,a-b);
	}
	int a2=a, b2=b;
	a=n/2-a; b=n/2-b;
	if(n%2 or n<m or a<0 or b<0)
	{
		cout << "0\n";
		return 0;
	}

	for(int i=0; i<N; i++) for(int j=0; j<N; j++) dp[i][j]=0LL;
	for(int i=0; i<N; i++) for(int j=0; j<N; j++)
	{
		if(j>i) dp[i][j]=0LL;
		else if(i==0)
		{
			if(j==0) dp[i][j]=1LL;
			else dp[i][j]=0LL;
		}
		else if(j==0) dp[i][j]=dp[i-1][j+1];
		else dp[i][j]=dp[i-1][j-1]+dp[i-1][j+1];
		dp[i][j]%=M;
	}

//	for(int i=0; i<=10; i++)
//	{
//		for(int j=0; j<=10; j++) dbg << dp[i][j] << ' ';
//		dbg << '\n';
//	}
	ll ans=0LL;
	for(int i=0; i<=a+b; i++) for(int j=-minbal; j<=a; j++)
	{
		int dif=j+(a2-b2);
		ll p=dp[i][j], q=(dif>=0)? dp[a+b-i][dif]:0LL;
		ans+=(((ll)p*q)%M);
//		if((((ll)p*q)%M)>0LL) dbg << i << ',' << j << '*' << a+b-i << ',' << dif << '\n';
		ans%=M;
	}
	cout << ans << '\n';
//	goto a;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) ((int) (x.size()))
//#define dbg cout

const int N=2005;
const ll M=(ll)1e9+7;
ll dp[N][N], sum[N][N]; /*dp[i][j]: number of ways to build string p with i opening brackets and j closing bracketss with this condition:
for any prefix of p, the number of openings is >= the number of closings (and also i>=j)\
after setting number of openings (=i) and closings (=j) for p, the number of openings (=i2) and closings (=j2) for q is known too.

******************IMPORTANT************************: valid sequences are also valid when iterating from the end and changing opening and closing brackets into the other. (let's call this reverse)

so to count the number of ways to form q, we look at its reverse and the number will be: dp[j2][i2]
*/

int main()
{
	ios::sync_with_stdio(0);
//	cin.tie(0);
//	freopen("in.txt","r",stdin);
//	freopen("out.txt","w",stdout);
a:
	int n, m; cin >> n >> m;
	int a=0, b=0;
	for(int i=0; i<m; i++)
	{
		char ch; cin >> ch;
		if(ch=='(') a++;
		else b++;
	}
	a=n/2-a; b=n/2-b;
	if(n%2 or n<m or a<0 or b<0)
	{
		cout << "0\n";
		return 0;
	}
	for(int i=0; i<N; i++) for(int j=0; j<N; j++) dp[i][j]=sum[i][j]=0LL;
	//init
	dp[0][0]=1LL;
	for(int j=0; j<=b; j++) sum[0][j]=1LL;
	//main
	for(int i=1; i<=max(a,b); i++) for(int j=0; j<=max(a,b); j++)
	{
		if(j>i) dp[i][j]=0LL;
		else dp[i][j]=sum[i-1][j];
		dp[i][j]%=M;
		sum[i][j]=dp[i][j]+((j)? sum[i][j-1]:0LL);
		sum[i][j]%=M;
	}
	//ans
	ll ans=0LL;
	for(int i=0; i<=a; i++) //number of openings in p
	{
		for(int j=0; j<=b; j++) //number of closings in p
		{
			int i2=a-i, j2=b-j;
			ll nump=dp[i][j], numq=dp[j2][i2];
//			dbg << i << ',' << j << ':' << dp[i][j] << "  *  " << i2 << ',' << j2 << ':' << dp[j2][i2] << '\n';
			ans+=((nump*numq)%M);
			ans%=M;
		}
	}
//	for(int i=0; i<=a; i++)
//	{
//		for(int j=0; j<=b; j++) dbg << dp[i][j] << ' ';
//		dbg << '\n';
//	}
	cout << ans << '\n';
//	goto a;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) ((int) (x.size()))
//#define dbg cout

const int N=2005;
const ll M=(ll)1e9+7;
ll dp[N][N], sum[N][N]; /*dp[i][j]: number of ways to build string p with i opening brackets and j closing bracketss with this condition:
for any prefix of p, the number of openings is >= the number of closings (and also i>=j)\
after setting number of openings (=i) and closings (=j) for p, the number of openings (=i2) and closings (=j2) for q is known too.

******************IMPORTANT************************: valid sequences are also valid when iterating from the end and changing opening and closing brackets into the other. (let's call this reverse)

so to count the number of ways to form q, we look at its reverse and the number will be: dp[j2][i2]
*/

int main()
{
	ios::sync_with_stdio(0);
//	cin.tie(0);
//	freopen("in.txt","r",stdin);
//	freopen("out.txt","w",stdout);
a:
	int n, m; cin >> n >> m;
	int a=0, b=0;
	for(int i=0; i<m; i++)
	{
		char ch; cin >> ch;
		if(ch=='(') a++;
		else b++;
	}
	int a2=a, b2=b;
	a=n/2-a; b=n/2-b;
	if(n%2 or n<m or a<0 or b<0)
	{
		cout << "0\n";
		return 0;
	}
	for(int i=0; i<N; i++) for(int j=0; j<N; j++) dp[i][j]=sum[i][j]=0LL;
	//init
	dp[0][0]=1LL;
	for(int j=0; j<=b; j++) sum[0][j]=1LL;
	//main
	for(int i=1; i<=max(a,b); i++) for(int j=0; j<=max(a,b); j++)
	{
		if(j>i) dp[i][j]=0LL;
		else dp[i][j]=sum[i-1][j];
		dp[i][j]%=M;
		sum[i][j]=dp[i][j]+((j)? sum[i][j-1]:0LL);
		sum[i][j]%=M;
	}
	//ans
	ll ans=0LL;
	for(int i=0; i<=a; i++) //number of openings in p
	{
		for(int j=0; j<=b; j++) //number of closings in p
		{
			int i2=a-i, j2=b-j;
			if(i2+a2<j2+b2) continue;
			ll nump=dp[i][j], numq=dp[j2][i2];
//			dbg << i << ',' << j << ':' << dp[i][j] << "  *  " << i2 << ',' << j2 << ':' << dp[j2][i2] << '\n';
			ans+=((nump*numq)%M);
			ans%=M;
		}
	}
//	for(int i=0; i<=a; i++)
//	{
//		for(int j=0; j<=b; j++) dbg << dp[i][j] << ' ';
//		dbg << '\n';
//	}
	cout << ans << '\n';
//	goto a;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) ((int) (x.size()))
//#define dbg cout

const int N=2005;
const int M=(int)1e9+7;
int dp[N][N], sum[N][N]; /*dp[i][j]: number of ways to build string p with i opening brackets and j closing bracketss with this condition:
for any prefix of p, the number of openings is >= the number of closings (and also i>=j)\
after setting number of openings (=i) and closings (=j) for p, the number of openings (=i2) and closings (=j2) for q is known too.

******************IMPORTANT************************: valid sequences are also valid when iterating from the end and changing opening and closing brackets into the other. (let's call this reverse)

so to count the number of ways to form q, we look at its reverse and the number will be: dp[j2][i2]
*/

int main()
{
	ios::sync_with_stdio(0);
//	cin.tie(0);
//	freopen("in.txt","r",stdin);
//	freopen("out.txt","w",stdout);
a:
	int n, m; cin >> n >> m;
	int a=0, b=0;
	for(int i=0; i<m; i++)
	{
		char ch; cin >> ch;
		if(ch=='(') a++;
		else b++;
	}
	a=n/2-a; b=n/2-b;
	if(n%2 or n<m or a<0 or b<0)
	{
		cout << "0\n";
		return 0;
	}
	memset(dp,0,sizeof dp);
	memset(sum,0,sizeof sum);
	//init
	dp[0][0]=1;
	for(int j=0; j<=b; j++) sum[0][j]=1;
	//main
	for(int i=0; i<=max(a,b); i++) for(int j=0; j<=max(a,b); j++)
	{
		if(j>i) dp[i][j]=0;
		else if(i) dp[i][j]=sum[i-1][j];
		dp[i][j]%=M;
		sum[i][j]=dp[i][j]+((j)? sum[i][j-1]:0);
		sum[i][j]%=M;
	}
	//ans
	int ans=0;
	for(int i=0; i<=a; i++) //number of openings in p
	{
		for(int j=0; j<=b; j++) //number of closings in p
		{
			int i2=a-i, j2=b-j;
			int nump=dp[i][j], numq=dp[j2][i2];
//			dbg << i << ',' << j << ':' << dp[i][j] << "  *  " << i2 << ',' << j2 << ':' << dp[j2][i2] << '\n';
			ans+=((nump*numq)%M);
			ans%=M;
		}
	}
//	for(int i=0; i<=a; i++)
//	{
//		for(int j=0; j<=b; j++) dbg << dp[i][j] << ' ';
//		dbg << '\n';
//	}
	cout << ans << '\n';
//	goto a;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) ((int) (x.size()))
//#define dbg cout

const int N=2005;
const ll M=(ll)1e9+7;
ll dp[N][N], sum[N][N];
/*dp[i][j]: number of ways to build string p with i opening brackets and j closing bracketss with this condition:
for any prefix of p, the number of openings is >= the number of closings (and also i>=j)\
after setting number of openings (=i) and closings (=j) for p, the number of openings (=i2) and closings (=j2) for q is known too.

******************IMPORTANT************************: valid sequences are also valid when iterating from the end and changing opening and closing brackets into the other. (let's call this reverse)

so to count the number of ways to form q, we look at its reverse and the number will be: dp[j2][i2]
*/

int main()
{
	ios::sync_with_stdio(0);
//	cin.tie(0);
//	freopen("in.txt","r",stdin);
//	freopen("out.txt","w",stdout);
a:
	int n, m; cin >> n >> m;
	int a=0, b=0, minbal=0;
	for(int i=0; i<m; i++)
	{
		char ch; cin >> ch;
		if(ch=='(') a++;
		else b++;
		minbal=min(minbal,a-b);
	}
	a=n/2-a; b=n/2-b;
	if(n%2 or n<m or a<0 or b<0)
	{
		cout << "0\n";
		return 0;
	}
	for(int i=0; i<N; i++) for(int j=0; j<N; j++) dp[i][j]=sum[i][j]=0LL;
	//init
	dp[0][0]=1LL;
	for(int j=0; j<=max(a,b); j++) sum[0][j]=1LL;
	//main
	for(int i=1; i<=max(a,b); i++) for(int j=0; j<=max(a,b); j++)
	{
		if(j>i) dp[i][j]=0LL;
		else dp[i][j]=sum[i-1][j];
		dp[i][j]%=M;
		sum[i][j]=dp[i][j]+((j)? sum[i][j-1]:0LL);
		sum[i][j]%=M;
		if(dp[i][j]<0LL or sum[i][j]<0LL) cout << "ERROR 0\n";
	}
	//ans
	ll ans=0LL;
	for(int i=0; i<=a; i++) //number of openings in p
	{
		for(int j=0; j<=b; j++) //number of closings in p
		{
			if(i-j<-minbal) continue;
			int i2=a-i, j2=b-j;
			ll nump=dp[i][j], numq=dp[j2][i2];
//			dbg << i << ',' << j << ':' << dp[i][j] << "  *  " << i2 << ',' << j2 << ':' << dp[j2][i2] << '\n';
			ans+=((ll)((ll)nump*numq)%M);
			ans%=M;
		}
	}
//	for(int i=0; i<=max(a,b); i++)
//	{
//		dbg << i << ':';
//		for(int j=0; j<=max(a,b); j++) dbg << dp[i][j] << ' ';
//		dbg << '\n';
//	}
	cout << ans << '\n';
//	goto a;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) ((int) (x.size()))
//#define dbg cout

//*********IMPORTANT*********: valid sequences are also valid when iterating from the end and changing opening and closing brackets into each other.
const int N=2005;
const ll M=(ll)1e9+7;
ll dp[N+5][N+5];

int main()
{
	ios::sync_with_stdio(0);
//	cin.tie(0);
//	freopen("in.txt","r",stdin);
//	freopen("out.txt","w",stdout);
a:
	int n, m; cin >> n >> m;
	int a=0, b=0;
	for(int i=0; i<m; i++)
	{
		char ch; cin >> ch;
		if(ch=='(') a++;
		else b++;
	}
	int a2=a, b2=b;
	a=n/2-a; b=n/2-b;
	if(n%2 or n<m or a<0 or b<0)
	{
		cout << "0\n";
		return 0;
	}

	for(int i=0; i<N; i++) for(int j=0; j<N; j++) dp[i][j]=0LL;
	for(int i=0; i<N; i++) for(int j=0; j<N; j++)
	{
		if(j>i) dp[i][j]=0LL;
		else if(i==0)
		{
			if(j==0) dp[i][j]=1LL;
			else dp[i][j]=0LL;
		}
		else if(j==0) dp[i][j]=dp[i-1][j+1];
		else dp[i][j]=dp[i-1][j-1]+dp[i-1][j+1];
		dp[i][j]%=M;
	}

//	for(int i=0; i<=10; i++)
//	{
//		for(int j=0; j<=10; j++) dbg << dp[i][j] << ' ';
//		dbg << '\n';
//	}
	ll ans=0LL;
	for(int i=0; i<=a+b; i++) for(int j=0; j<=a; j++)
	{
		int dif=j+(a2-b2);
		ll p=dp[i][j], q=(dif>=0)? dp[a+b-i][dif]:0LL;
		ans+=(((ll)p*q)%M);
//		if((((ll)p*q)%M)>0LL) dbg << i << ',' << j << '*' << a+b-i << ',' << dif << '\n';
		ans%=M;
	}
	cout << ans << '\n';
//	goto a;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) ((int) (x.size()))
//#define dbg cout

const int N=2005;
const ll M=(ll)1e9+7;
ll dp[N][N], sum[N][N];
/*dp[i][j]: number of ways to build string p with i opening brackets and j closing bracketss with this condition:
for any prefix of p, the number of openings is >= the number of closings (and also i>=j)\
after setting number of openings (=i) and closings (=j) for p, the number of openings (=i2) and closings (=j2) for q is known too.

******************IMPORTANT************************: valid sequences are also valid when iterating from the end and changing opening and closing brackets into the other. (let's call this reverse)

so to count the number of ways to form q, we look at its reverse and the number will be: dp[j2][i2]
*/

int main()
{
	ios::sync_with_stdio(0);
//	cin.tie(0);
//	freopen("in.txt","r",stdin);
//	freopen("out.txt","w",stdout);
a:
	int n, m; cin >> n >> m;
	int a=0, b=0;
	for(int i=0; i<m; i++)
	{
		char ch; cin >> ch;
		if(ch=='(') a++;
		else b++;
	}
	a=n/2-a; b=n/2-b;
	if(n%2 or n<m or a<0 or b<0)
	{
		cout << "0\n";
		return 0;
	}
	for(int i=0; i<N; i++) for(int j=0; j<N; j++) dp[i][j]=sum[i][j]=0LL;
	//init
	dp[0][0]=1LL;
	for(int j=0; j<=max(a,b); j++) sum[0][j]=1LL;
	//main
	for(int i=1; i<=max(a,b); i++) for(int j=0; j<=max(a,b); j++)
	{
		if(j>i) dp[i][j]=0LL;
		else dp[i][j]=sum[i-1][j];
		dp[i][j]%=M;
		sum[i][j]=dp[i][j]+((j)? sum[i][j-1]:0LL);
		sum[i][j]%=M;
	}
	//ans
	ll ans=0LL;
	for(int i=0; i<=a; i++) //number of openings in p
	{
		for(int j=0; j<=b; j++) //number of closings in p
		{
			int i2=a-i, j2=b-j;
			ll nump=dp[i][j], numq=dp[j2][i2];
//			dbg << i << ',' << j << ':' << dp[i][j] << "  *  " << i2 << ',' << j2 << ':' << dp[j2][i2] << '\n';
			ans+=((ll)((ll)nump*numq)%M);
			ans%=M;
		}
	}
//	for(int i=0; i<=a; i++)
//	{
//		for(int j=0; j<=b; j++) dbg << dp[i][j] << ' ';
//		dbg << '\n';
//	}
	cout << ans << '\n';
//	goto a;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) ((int) (x.size()))
//#define dbg cout

const int N=2005;
const ll M=(ll)1e9+7;
ll dp[N][N], sum[N][N];
/*dp[i][j]: number of ways to build string p with i opening brackets and j closing bracketss with this condition:
for any prefix of p, the number of openings is >= the number of closings (and also i>=j)\
after setting number of openings (=i) and closings (=j) for p, the number of openings (=i2) and closings (=j2) for q is known too.

******************IMPORTANT************************: valid sequences are also valid when iterating from the end and changing opening and closing brackets into the other. (let's call this reverse)

so to count the number of ways to form q, we look at its reverse and the number will be: dp[j2][i2]
*/

int main()
{
	ios::sync_with_stdio(0);
//	cin.tie(0);
//	freopen("in.txt","r",stdin);
//	freopen("out.txt","w",stdout);
a:
	int n, m; cin >> n >> m;
	int a=0, b=0;
	for(int i=0; i<m; i++)
	{
		char ch; cin >> ch;
		if(ch=='(') a++;
		else b++;
	}
	a=n/2-a; b=n/2-b;
	if(n%2 or n<m or a<0 or b<0)
	{
		cout << "0\n";
		return 0;
	}
	for(int i=0; i<N; i++) for(int j=0; j<N; j++) dp[i][j]=sum[i][j]=0LL;
	//init
	dp[0][0]=1LL;
	for(int j=0; j<=max(a,b); j++) sum[0][j]=1LL;
	//main
	for(int i=1; i<=max(a,b); i++) for(int j=0; j<=max(a,b); j++)
	{
		if(j>i) dp[i][j]=0LL;
		else dp[i][j]=sum[i-1][j];
		dp[i][j]%=M;
		sum[i][j]=dp[i][j]+((j)? sum[i][j-1]:0LL);
		sum[i][j]%=M;
		if(dp[i][j]<0LL or sum[i][j]<0LL) cout << "ERROR 0\n";
	}
	//ans
	ll ans=0LL;
	for(int i=0; i<=a; i++) //number of openings in p
	{
		for(int j=0; j<=b; j++) //number of closings in p
		{
			int i2=a-i, j2=b-j;
			ll nump=dp[i][j], numq=dp[j2][i2];
//			dbg << i << ',' << j << ':' << dp[i][j] << "  *  " << i2 << ',' << j2 << ':' << dp[j2][i2] << '\n';
			ans+=((ll)((ll)nump*numq)%M);
			ans%=M;
			if(ans<0LL or nump<0LL or numq<0LL or ((ll)((ll)nump*numq)%M)<0LL) cout << "ERROR 0\n";
		}
	}
//	for(int i=0; i<=max(a,b); i++)
//	{
//		dbg << i << ':';
//		for(int j=0; j<=max(a,b); j++) dbg << dp[i][j] << ' ';
//		dbg << '\n';
//	}
	cout << ans << '\n';
//	goto a;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fr first
#define sc second
#define ARRS int(1e5+11)
#define MOD ((long long)1000000007)

ll i,j,l,k,n,p,c[ARRS],d,mx,mn,x,y,ans,res,sum;

deque<ll> q;
ll m;
string s;
ll dp[5007][5007];

ll pas[5017][5017];

int main(){
    #ifdef KHOKHO
        freopen("in.in","r",stdin);
        freopen("out.out","w+",stdout);
    #endif //KHOKHO
   // cout<<pw(5,3)<<endl;
    cin>>n>>m;
    cin>>s;
    if(n&1){
        cout<<0;
        return 0;
    }
    ll p=0,c2=0,c1=0;
    for(int i=0; i<s.size(); i++){
        if(s[i]=='(')
            c2--,c1--;
        if(s[i]==')')
            c2++,c1++;
        p=max(p,c2);
        if(c1>=0)c1=0;
    }
   // cout<<p<<" "<<-c1<<endl;
    if(n-m<p+c1)
        {cout<<0;return 0;}
    ll l=n-m-p+c1;
  //  ll pas=0;
    c1=-c1;
   // cout<<l<<endl;
//    dp[p][c1][0]=1;
    //if(l)
//    dp[p][c1][1]=0;
    dp[0][0]=1;
   // pas=0;
    ll p1=0,p2=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++){
            //if(i+j>m-n)continue;
            if(i<j)continue;
            pas[i-j][i+j]+=dp[i][j];
            pas[i-j][i+j]%=MOD;
            if(i==j){
                dp[i+1][j]+=dp[i][j];
                dp[i+1][j]%=MOD;
            } else {
                dp[i+1][j]+=dp[i][j];
                dp[i+1][j]%=MOD;
                dp[i][j+1]+=dp[i][j];
                dp[i][j+1]%=MOD;
            }
        }
    }
    ll pp=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++)
            pp=(pp+pas[p+i][j]*pas[c1+i][n-m-j])%MOD;
    }
    cout<<pp<<endl;
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fr first
#define sc second
#define ARRS int(1e5+11)
#define MOD ((long long)1000000007)

ll i,j,l,k,n,p,c[ARRS],d,mx,mn,x,y,ans,res,sum;

deque<ll> q;
ll m;
string s;
ll dp[4007][4007];
ll pw(ll a,ll b){
    ll p=1;
    while(b){
        if(b&1)p=(p*a)%MOD;
        a=(a*a)%MOD;
        b/=2;
    }
    return p;
}

ll f[ARRS];

ll binc(ll a,ll b){
    return (f[a]*(pw(b,MOD-2)*pw(a-b,MOD-2))%MOD)%MOD;
}
ll pas[4017][4017];

int main(){
    #ifdef KHOKHO
        freopen("in.in","r",stdin);
        freopen("out.out","w+",stdout);
    #endif //KHOKHO
   // cout<<pw(5,3)<<endl;
    f[0]=1;
    for(int i=1; i<100000; i++){
        f[i]=(f[i-1]*i)%MOD;
    }
    cin>>n>>m;
    cin>>s;
    if(n&1){
        cout<<0;
        return 0;
    }
    ll p=0,c2=0,c1=0;
    for(int i=0; i<s.size(); i++){
        if(s[i]=='(')
            c2--,c1--;
        if(s[i]==')')
            c2++,c1++;
        p=max(p,c2);
        if(c1>=0)c1=0;
    }
   // cout<<p<<" "<<-c1<<endl;
    if(n-m<p+c1)
        {cout<<0;return 0;}
    ll l=n-m-p+c1;
  //  ll pas=0;
    c1=-c1;
   // cout<<l<<endl;
//    dp[p][c1][0]=1;
    //if(l)
//    dp[p][c1][1]=0;
    dp[0][0]=1;
   // pas=0;
    ll p1=0,p2=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++){
            //if(i+j>m-n)continue;
            if(i<j)continue;
            pas[i-j][i+j]+=dp[i][j];
            pas[i-j][i+j]%=MOD;
            if(i==j){
                dp[i+1][j]+=dp[i][j];
                dp[i+1][j]%=MOD;
            } else {
                dp[i+1][j]+=dp[i][j];
                dp[i+1][j]%=MOD;
                dp[i][j+1]+=dp[i][j];
                dp[i][j+1]%=MOD;
            }
        }
    }
    ll pp=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++)
            pp=(pp+pas[p+i][j]*pas[c1+i][n-m-j])%MOD;
    }
    cout<<pp<<endl;
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fr first
#define sc second
#define ARRS int(1e5+11)
#define MOD ((long long)1000000007)

ll i,j,l,k,n,p,d,mx,mn,x,y,ans,res,sum;

deque<ll> q;
ll m;
string s;
ll dp[4007][4007];

ll pas[4017][4017];

int main(){
    #ifdef KHOKHO
        freopen("in.in","r",stdin);
        freopen("out.out","w+",stdout);
    #endif //KHOKHO
   // cout<<pw(5,3)<<endl;
    cin>>n>>m;
    cin>>s;
    if(n&1){
        cout<<0;
        return 0;
    }
    ll p=0,c2=0,c1=0;
    for(int i=0; i<s.size(); i++){
        if(s[i]=='(')
            c2--,c1--;
        if(s[i]==')')
            c2++,c1++;
        p=max(p,c2);
        if(c1>=0)c1=0;
    }
   // cout<<p<<" "<<-c1<<endl;
    if(n-m<p+c1)
        {cout<<0;return 0;}
    ll l=n-m-p+c1;
  //  ll pas=0;
    c1=-c1;
   // cout<<l<<endl;
//    dp[p][c1][0]=1;
    //if(l)
//    dp[p][c1][1]=0;
    dp[0][0]=1;
   // pas=0;
    ll p1=0,p2=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++){
            //if(i+j>m-n)continue;
            if(i<j)continue;
            if(i+j>n-m)continue;
            pas[i-j][i+j]+=dp[i][j];
            pas[i-j][i+j]%=MOD;
            if(i==j){
                dp[i+1][j]+=dp[i][j];
                dp[i+1][j]%=MOD;
            } else {
                dp[i+1][j]+=dp[i][j];
                dp[i+1][j]%=MOD;
                dp[i][j+1]+=dp[i][j];
                dp[i][j+1]%=MOD;
            }
        }
    }
    ll pp=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++){
            if(p+i>n-m)continue;
            if(c1+i>n-m)continue;
            pp=(pp+pas[p+i][j]*pas[c1+i][n-m-j])%MOD;

        }
    }
    cout<<pp<<endl;
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fr first
#define sc second
#define ARRS int(1e5+11)
#define MOD ((long long)1000000007)

ll i,j,l,k,n,p,c[ARRS],d,mx,mn,x,y,ans,res,sum;

deque<ll> q;
ll m;
string s;
ll dp[2007][2007];
ll pw(ll a,ll b){
    ll p=1;
    while(b){
        if(b&1)p=(p*a)%MOD;
        a=(a*a)%MOD;
        b/=2;
    }
    return p;
}

ll f[ARRS];

ll binc(ll a,ll b){
    return (f[a]*(pw(b,MOD-2)*pw(a-b,MOD-2))%MOD)%MOD;
}
ll pas[2017][2017];

int main(){
    #ifdef KHOKHO
        freopen("in.in","r",stdin);
        freopen("out.out","w+",stdout);
    #endif //KHOKHO
   // cout<<pw(5,3)<<endl;
    f[0]=1;
    for(int i=1; i<100000; i++){
        f[i]=(f[i-1]*i)%MOD;
    }
    cin>>n>>m;
    cin>>s;
    if(n&1){
        cout<<0;
        return 0;
    }
    ll p=0,c2=0,c1=0;
    for(int i=0; i<s.size(); i++){
        if(s[i]=='(')
            c2--,c1--;
        if(s[i]==')')
            c2++,c1++;
        p=max(p,c2);
        if(c1>=0)c1=0;
    }
   // cout<<p<<" "<<-c1<<endl;
    if(n-m<p+c1)
        return 0;
    ll l=n-m-p+c1;
  //  ll pas=0;
    c1=-c1;
   // cout<<l<<endl;
//    dp[p][c1][0]=1;
    //if(l)
//    dp[p][c1][1]=0;
    dp[0][0]=1;
   // pas=0;
    ll p1=0,p2=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++){
            //if(i+j>m-n)continue;
            if(i<j)continue;
            pas[i-j][i+j]+=dp[i][j];
            if(i==j){
                dp[i+1][j]+=dp[i][j];
            } else {
                dp[i+1][j]+=dp[i][j];
                dp[i][j+1]+=dp[i][j];
            }
        }
    }
    ll pp=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++)
            pp=(pp+pas[p+i][j]*pas[c1+i][n-m-j])%MOD;
    }
    cout<<pp<<endl;
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fr first
#define sc second
#define ARRS int(1e5+11)
#define MOD ((long long)1000000007)

ll i,j,l,k,n,p,c[ARRS],d,mx,mn,x,y,ans,res,sum;

deque<ll> q;
ll m;
string s;
ll dp[4007][4007];
ll pw(ll a,ll b){
    ll p=1;
    while(b){
        if(b&1)p=(p*a)%MOD;
        a=(a*a)%MOD;
        b/=2;
    }
    return p;
}

ll f[ARRS];

ll binc(ll a,ll b){
    return (f[a]*(pw(b,MOD-2)*pw(a-b,MOD-2))%MOD)%MOD;
}
ll pas[4017][4017];

int main(){
    #ifdef KHOKHO
        freopen("in.in","r",stdin);
        freopen("out.out","w+",stdout);
    #endif //KHOKHO
   // cout<<pw(5,3)<<endl;
    f[0]=1;
    for(int i=1; i<100000; i++){
        f[i]=(f[i-1]*i)%MOD;
    }
    cin>>n>>m;
    cin>>s;
    if(n&1){
        cout<<0;
        return 0;
    }
    ll p=0,c2=0,c1=0;
    for(int i=0; i<s.size(); i++){
        if(s[i]=='(')
            c2--,c1--;
        if(s[i]==')')
            c2++,c1++;
        p=max(p,c2);
        if(c1>=0)c1=0;
    }
   // cout<<p<<" "<<-c1<<endl;
    if(n-m<p+c1)
        return 0;
    ll l=n-m-p+c1;
  //  ll pas=0;
    c1=-c1;
   // cout<<l<<endl;
//    dp[p][c1][0]=1;
    //if(l)
//    dp[p][c1][1]=0;
    dp[0][0]=1;
   // pas=0;
    ll p1=0,p2=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++){
            //if(i+j>m-n)continue;
            if(i<j)continue;
            pas[i-j][i+j]+=dp[i][j];
            if(i==j){
                dp[i+1][j]+=dp[i][j];
            } else {
                dp[i+1][j]+=dp[i][j];
                dp[i][j+1]+=dp[i][j];
            }
        }
    }
    ll pp=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++)
            pp=(pp+pas[p+i][j]*pas[c1+i][n-m-j])%MOD;
    }
    cout<<pp<<endl;
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fr first
#define sc second
#define ARRS int(1e5+11)
#define MOD ((long long)1000000007)

ll i,j,l,k,n,p,d,mx,mn,x,y,ans,res,sum;

deque<ll> q;
ll m;
string s;
ll dp[4507][4507];

ll pas[4517][4517];

int main(){
    #ifdef KHOKHO
        freopen("in.in","r",stdin);
        freopen("out.out","w+",stdout);
    #endif //KHOKHO
   // cout<<pw(5,3)<<endl;
    cin>>n>>m;
    cin>>s;
    if(n&1){
        cout<<0;
        return 0;
    }
    ll p=0,c2=0,c1=0;
    for(int i=0; i<s.size(); i++){
        if(s[i]=='(')
            c2--,c1--;
        if(s[i]==')')
            c2++,c1++;
        p=max(p,c2);
        if(c1>=0)c1=0;
    }
   // cout<<p<<" "<<-c1<<endl;
    if(n-m<p+c1)
        {cout<<0;return 0;}
    ll l=n-m-p+c1;
  //  ll pas=0;
    c1=-c1;
   // cout<<l<<endl;
//    dp[p][c1][0]=1;
    //if(l)
//    dp[p][c1][1]=0;
    dp[0][0]=1;
   // pas=0;
    ll p1=0,p2=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++){
            //if(i+j>m-n)continue;
            if(i<j)continue;
            pas[i-j][i+j]+=dp[i][j];
            pas[i-j][i+j]%=MOD;
            if(i==j){
                dp[i+1][j]+=dp[i][j];
                dp[i+1][j]%=MOD;
            } else {
                dp[i+1][j]+=dp[i][j];
                dp[i+1][j]%=MOD;
                dp[i][j+1]+=dp[i][j];
                dp[i][j+1]%=MOD;
            }
        }
    }
    ll pp=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++)
            pp=(pp+pas[p+i][j]*pas[c1+i][n-m-j])%MOD;
    }
    cout<<pp<<endl;
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define fr first
#define sc second
#define ARRS int(1e5+11)
#define MOD ((long long)1000000007)

ll i,j,l,k,n,p,c[ARRS],d,mx,mn,x,y,ans,res,sum;

deque<ll> q;
ll m;
string s;
ll dp[4007][4007];
ll pw(ll a,ll b){
    ll p=1;
    while(b){
        if(b&1)p=(p*a)%MOD;
        a=(a*a)%MOD;
        b/=2;
    }
    return p;
}

ll f[ARRS];

ll binc(ll a,ll b){
    return (f[a]*(pw(b,MOD-2)*pw(a-b,MOD-2))%MOD)%MOD;
}
ll pas[4017][4017];

int main(){
    #ifdef KHOKHO
        freopen("in.in","r",stdin);
        freopen("out.out","w+",stdout);
    #endif //KHOKHO
   // cout<<pw(5,3)<<endl;
    f[0]=1;
    for(int i=1; i<100000; i++){
        f[i]=(f[i-1]*i)%MOD;
    }
    cin>>n>>m;
    cin>>s;
    if(n&1){
        cout<<0;
        return 0;
    }
    ll p=0,c2=0,c1=0;
    for(int i=0; i<s.size(); i++){
        if(s[i]=='(')
            c2--,c1--;
        if(s[i]==')')
            c2++,c1++;
        p=max(p,c2);
        if(c1>=0)c1=0;
    }
   // cout<<p<<" "<<-c1<<endl;
    if(n-m<p+c1)
        return 0;
    ll l=n-m-p+c1;
  //  ll pas=0;
    c1=-c1;
   // cout<<l<<endl;
//    dp[p][c1][0]=1;
    //if(l)
//    dp[p][c1][1]=0;
    dp[0][0]=1;
   // pas=0;
    ll p1=0,p2=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++){
            //if(i+j>m-n)continue;
            if(i<j)continue;
            pas[i-j][i+j]+=dp[i][j];
            pas[i-j][i+j]%=MOD;
            if(i==j){
                dp[i+1][j]+=dp[i][j];
                dp[i+1][j]%=MOD;
            } else {
                dp[i+1][j]+=dp[i][j];
                dp[i+1][j]%=MOD;
                dp[i][j+1]+=dp[i][j];
                dp[i][j+1]%=MOD;
            }
        }
    }
    ll pp=0;
    for(int i=0; i<=n-m; i++){
        for(int j=0; j<=n-m; j++)
            pp=(pp+pas[p+i][j]*pas[c1+i][n-m-j])%MOD;
    }
    cout<<pp<<endl;
    return 0;

}


#include<iostream>

using namespace std;

#define int long long

const int md=1e9+7;

int dp[5000+5][5000+5];

main()
{
    int n,m;
    cin>>n>>m;
    string s;
    cin>>s;
    int bal_min=0;
    int bal_max=0;
    for (int i=0; i<m; i++)
    {
        if (s[i]=='(') bal_max++;
        else bal_max--;
        bal_min=min(bal_min,bal_max);
    }
    dp[0][0]=1;
    dp[1][1]=1;
    for (int i=2; i<=n; i++)
    {
        dp[i][0]=dp[i-1][1];
        dp[i][n]=dp[i-1][n-1];
        for (int j=1; j<n; j++)
        {
            dp[i][j]=dp[i-1][j-1]+dp[i-1][j+1];
            dp[i][j]%=md;
        }
    }
    /*for (int i=0; i<=n; i++)
    {
        for (int j=0; j<=n; j++)
        {
            cout<<dp[i][j]<<" ";
        }
        cout<<endl;
    }*/
    int ans=0;
    for (int l=0; l<=n-m; l++)
    {
        for (int q=-bal_min; q<=n-m; q++)
        {
            if (q<0 || dp[l][q]==0 || q+bal_max < 0 || q+bal_max > n-m-l) continue;
            ans+=dp[l][q]*dp[n-m-l][q+bal_max];
            ans%=md;
            //cout<<n<<" "<<m<<" "<<l<<" "<<q<<" "<<bal_max<<" "<<ans<<endl;
        }
    }
    cout<<ans%md;
}


#include<iostream>

using namespace std;

#define int long long

const int md=1e9+7;

int dp[5000+5][5000+5];

main()
{
    int n,m;
    cin>>n>>m;
    string s;
    cin>>s;
    int bal_min=0;
    int bal_max=0;
    for (int i=0; i<m; i++)
    {
        if (s[i]=='(') bal_max++;
        else bal_max--;
        bal_min=min(bal_min,bal_max);
    }
    dp[0][0]=1;
    dp[1][1]=1;
    for (int i=2; i<=n; i++)
    {
        for (int j=0; j<=n; j++)
        {
            dp[i][j]=dp[i-1][j-1]+dp[i-1][j+1];
            dp[i][j]%=md;
        }
    }
    /*for (int i=0; i<=n; i++)
    {
        for (int j=0; j<=n; j++)
        {
            cout<<dp[i][j]<<" ";
        }
        cout<<endl;
    }*/
    int ans=0;
    for (int l=0; l<=n-m; l++)
    {
        for (int q=bal_min; q<=n-m; q++)
        {
            if (dp[l][q]==0) continue;
            ans+=dp[l][q]*dp[n-m-l][q+bal_max];
            ans%=md;
            //cout<<n<<" "<<m<<" "<<l<<" "<<q<<" "<<bal_max<<" "<<ans<<endl;
        }
    }
    cout<<ans%md;
}


#include<iostream>

using namespace std;

#define int long long

const int md=1e9+7;

int dp[5000+5][5000+5];

main()
{
    int n,m;
    cin>>n>>m;
    string s;
    cin>>s;
    int bal_min=0;
    int bal_max=0;
    for (int i=0; i<m; i++)
    {
        if (s[i]=='(') bal_max++;
        else bal_max--;
        bal_min=min(bal_min,bal_max);
    }
    dp[0][0]=1;
    dp[1][1]=1;
    for (int i=2; i<=n-m; i++)
    {
        dp[i][0]=dp[i-1][1];
        dp[i][n-m]=dp[i-1][n-m-1];
        for (int j=1; j<n-m; j++)
        {
            dp[i][j]=dp[i-1][j-1]+dp[i-1][j+1];
            dp[i][j]%=md;
        }
    }
    /*for (int i=0; i<=n; i++)
    {
        for (int j=0; j<=n; j++)
        {
            cout<<dp[i][j]<<" ";
        }
        cout<<endl;
    }*/
    int ans=0;
    for (int l=0; l<=n-m; l++)
    {
        for (int q=-bal_min; q<=n-m; q++)
        {
            if (q<0 || dp[l][q]==0 || q+bal_max < 0 || q+bal_max > n-m-l) continue;
            ans+=dp[l][q]*dp[n-m-l][q+bal_max];
            ans%=md;
            //cout<<n<<" "<<m<<" "<<l<<" "<<q<<" "<<bal_max<<" "<<ans<<endl;
        }
    }
    cout<<ans%md;
}


#include<iostream>

using namespace std;

#define int long long

const int md=1e9+7;

int dp[5000+5][5000+5];

main()
{
    int n,m;
    cin>>n>>m;
    string s;
    cin>>s;
    int bal_min=0;
    int bal_max=0;
    for (int i=0; i<m; i++)
    {
        if (s[i]=='(') bal_max++;
        else bal_max--;
        bal_min=min(bal_min,bal_max);
    }
    dp[0][0]=1;
    dp[1][1]=1;
    for (int i=2; i<=n; i++)
    {
        dp[i][0]=dp[i-1][1];
        dp[i][n]=dp[i-1][n-1];
        for (int j=1; j<n; j++)
        {
            dp[i][j]=dp[i-1][j-1]+dp[i-1][j+1];
            dp[i][j]%=md;
        }
    }
    /*for (int i=0; i<=n; i++)
    {
        for (int j=0; j<=n; j++)
        {
            cout<<dp[i][j]<<" ";
        }
        cout<<endl;
    }*/
    int ans=0;
    for (int l=0; l<=n-m; l++)
    {
        for (int q=bal_min; q<=n-m; q++)
        {
            if (dp[l][q]==0||q+bal_max < 0 || q+bal_max > n-m-l) continue;
            ans+=dp[l][q]*dp[n-m-l][q+bal_max];
            ans%=md;
            //cout<<n<<" "<<m<<" "<<l<<" "<<q<<" "<<bal_max<<" "<<ans<<endl;
        }
    }
    cout<<ans%md;
}


#include<iostream>

using namespace std;

#define int long long

const int md=1e9+7;

int dp[5000+5][5000+5];

main()
{
    int n,m;
    cin>>n>>m;
    string s;
    cin>>s;
    int bal_min=0;
    int bal_max=0;
    for (int i=0; i<m; i++)
    {
        if (s[i]=='(') bal_max++;
        else bal_max--;
        bal_min=min(bal_min,bal_max);
    }
    dp[0][0]=1;
    dp[1][1]=1;
    for (int i=2; i<=n; i++)
    {
        dp[i][0]=dp[i-1][1];
        dp[i][n]=dp[i-1][n-1];
        for (int j=1; j<n; j++)
        {
            dp[i][j]=dp[i-1][j-1]+dp[i-1][j+1];
            dp[i][j]%=md;
        }
    }
    /*for (int i=0; i<=n; i++)
    {
        for (int j=0; j<=n; j++)
        {
            cout<<dp[i][j]<<" ";
        }
        cout<<endl;
    }*/
    int ans=0;
    for (int l=0; l<=n-m; l++)
    {
        for (int q=bal_min; q<=n-m; q++)
        {
            if (dp[l][q]==0) continue;
            ans+=dp[l][q]*dp[n-m-l][q+bal_max];
            ans%=md;
            //cout<<n<<" "<<m<<" "<<l<<" "<<q<<" "<<bal_max<<" "<<ans<<endl;
        }
    }
    cout<<ans%md;
}


#include<bits/stdc++.h>

using namespace std;

#define ll long long
const ll mod =  1e9+7;

int n, m;
ll f[2005][2005], ans;
string s;
int main() {
    ios_base::sync_with_stdio(false);
    cin >> n >> m >> s;
    s = ' ' + s;
    f[0][0] = f[1][1] = 1;

    int lim;
    for(int i = 2;i <= 2000;i++) {
        lim = min(i, 2000-i);
        for(int j = 0;j <= lim;j++) f[i][j] = (f[i-1][j-1] + f[i-1][j+1])%mod;
    }

    int op_id = 0, cl_id = 0, len = n - m;
    stack<int> st;
    for(int i = 1;i <= m;i++)
        if(s[i] == ')')
            if(!st.empty()) st.pop();
            else op_id++;
        else st.push(1);
    cl_id = st.size();
   // cout << op_id << ' ' << cl_id << endl;
    for(int i = 0;i <= len;i++)
        for(int j = op_id;j <= i;j++)
        if(len-i >= cl_id + j - op_id)
            ans = (ans + f[i][j]*f[len-i][cl_id + j - op_id] + 1LL*mod*mod)%mod;

    cout << ans;
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll long long
const ll mod =  1e9+7;

int n, m;
ll f[2005][2005], ans;
string s;
int main() {
    ios_base::sync_with_stdio(false);
    cin >> n >> m >> s;
    s = ' ' + s;
    f[0][0] = f[1][1] = 1;

    int lim;
    for(int i = 2;i <= 2000;i++) {
        lim = min(i, 2000-i);
        for(int j = 0;j <= lim;j++) f[i][j] = (f[i-1][j-1] + f[i-1][j+1])%mod;
    }

    int op_id = 0, cl_id = 0, len = n - m;
    stack<int> st;
    for(int i = 1;i <= m;i++)
        if(s[i] == ')')
            if(!st.empty()) st.pop();
            else op_id++;
        else st.push(1);
    cl_id = st.size();
   // cout << op_id << ' ' << cl_id << endl;
    for(int i = 0;i <= len;i++)
        for(int j = op_id;j <= i;j++)
        if(len-i >= cl_id + j - op_id)
        {
            ans += f[i][j]*f[len-i][cl_id + j - op_id];
            ans = (ans + 1LL*mod*mod)%mod;
        }
    cout << ans;
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll long long
const ll mod =  1e9+7;

int n, m;
ll f[2005][2005], ans;
string s;
int main() {
    ios_base::sync_with_stdio(false);
    cin >> n >> m >> s;
    s = ' ' + s;
    f[0][0] = f[1][1] = 1;

    int lim;
    for(int i = 2;i <= 2000;i++) {
        //lim = min(i, 2000-i);
        lim = i;
        for(int j = 0;j <= lim;j++)
            if(j) f[i][j] = (f[i-1][j-1] + f[i-1][j+1])%mod;
            else f[i][j] = f[i-1][j+1];
    }

    int op_id = 0, cl_id = 0, len = n - m;
    stack<int> st;
    for(int i = 1;i <= m;i++)
        if(s[i] == ')')
            if(!st.empty()) st.pop();
            else op_id++;
        else st.push(1);
    cl_id = st.size();
   // cout << op_id << ' ' << cl_id << endl;
    for(int i = 0;i <= len;i++)
        for(int j = op_id;j <= i;j++)
        if(len-i >= cl_id + j - op_id)
            ans = (ans + f[i][j]*f[len-i][cl_id + j - op_id] + 1LL*mod*mod)%mod;

    cout << ans;
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll long long
const ll mod =  1e9+7;

int n, m;
ll f[2005][2005], ans;
string s;
int main() {
    ios_base::sync_with_stdio(false);
    cin >> n >> m >> s;
    s = ' ' + s;
    f[0][0] = f[1][1] = 1;

    int lim;
    for(int i = 2;i <= 2000;i++) {
        lim = min(i, 2000-i);
        for(int j = 0;j <= lim;j++) f[i][j] = (f[i-1][j-1] + f[i-1][j+1])%mod;
    }

    int op_id = 0, cl_id = 0, len = n - m;
    stack<int> st;
    for(int i = 1;i <= m;i++)
        if(s[i] == ')')
            if(!st.empty()) st.pop();
            else op_id++;
        else st.push(1);
    cl_id = st.size();
   // cout << op_id << ' ' << cl_id << endl;
    for(int i = 0;i <= len;i++)
        for(int j = op_id;j <= len;j++) {
            ans += f[i][j]*f[len-i][cl_id+ j - op_id];
            ans = (ans + 1LL*mod*mod)%mod;
        }
    cout << ans;
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define int long long
#define N 100005
#define M 10000005
int n, m, a[N], b[N], cnt[M], pr[M];

void init() {
    for(int i = 2;i <= M-5;i++)
        if(!pr[i]) for(int j = i;j <= M-5;j+=i) pr[j] = i;
}

void factor(int val, int t) {
    int x;
    while(val > 1) {
        x = pr[val];
        cnt[x] += t;
        val/=x;
    }
}
signed main() {
    ios_base::sync_with_stdio(false);
    cin >> n >> m;

    init();
    for(int i = 1;i <= n;i++) cin >> a[i], factor(a[i], 1);
    for(int i = 1;i <= m;i++) cin >> b[i], factor(b[i], -1);
    cout << n << ' ' << m << endl;

    int val, res, x;
    for(int i = 1;i <= n;i++) {
        val = a[i], res = 1;
        while(val > 1) {
            x = pr[val];
            if(cnt[x] > 0) res *= x, cnt[x]--;
            val /= x;
        }
        cout << res;
        if(i < n) cout << ' '; else cout << endl;
    }

    for(int i = 1;i <= m;i++) {
        val = b[i], res = 1;
        while(val > 1) {
            x = pr[val];
            if(cnt[x] < 0) cnt[x]++, res *= x;
            val /= x;
        }
        cout << res;
        if(i < m) cout << ' ';
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

#define ll long long
const ll mod =  1e9+7;

int n, m;
ll f[2005][2005], ans;
string s;
int main() {
    ios_base::sync_with_stdio(false);
    cin >> n >> m >> s;
    s = ' ' + s;
    f[0][0] = f[1][1] = 1;

    int lim;
    for(int i = 2;i <= 2000;i++) {
        lim = min(i, 2000-i);
        for(int j = 0;j <= lim;j++) f[i][j] = (f[i-1][j-1] + f[i-1][j+1])%mod;
    }

    int op_id = 0, cl_id = 0, len = n - m;
    stack<int> st;
    for(int i = 1;i <= m;i++)
        if(s[i] == ')')
            if(!st.empty()) st.pop();
            else op_id++;
        else st.push(1);
    cl_id = st.size();
   // cout << op_id << ' ' << cl_id << endl;
    for(int i = 0;i <= len;i++)
        for(int j = op_id;j <= len;j++)
            ans += f[i][j]*f[len-i][cl_id+ j - op_id];
    cout << ans;
    return 0;
}