#include<bits/stdc++.h>
typedef long long ll;
#define int ll
using namespace std;
const int mod = 1e9+7;
const int MAXN = 100000005;

signed main(){
    std::ios::sync_with_stdio(false);
    int a,b,c;
    cin >>a >> b>>c;
    c *= 1000;
    int maxn,minn;
    minn = c/b;
    maxn = c/a;
    if(c-minn*b <= minn*(b-a) && c - maxn*a <= minn*(b-a)){
        if(c - minn*b != 0)
            minn++;
        cout << minn << ' ' << maxn;
        return 0;
    }
    else
        cout << "UNSATISFIABLE";
    return 0;
}



#include<bits/stdc++.h>
#define int long long
#define rd(x) x=read()
#define seg(x,y) (seg){x,y}
using namespace std;
const int N=1e5+5;
const int M=505;
const int inf=0x3f3f3f3f;
const int mod=1e9+7;
inline int read(){int x=0,f=1;char ch=getchar();while(ch>'9'||ch<'0'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}return x*f;}
int ksm(int x,int y){int ret=1;while (y){if (y&1) ret=(ret*x)%mod;x=(x*x)%mod;y>>=1;}return ret;}
int n,m,ans;
void solve(int x,int y)
{
	if (x%y==0) {ans+=x*2-y;return;}
	ans+=(x-x%y)*2;
	solve(y,x%y);
}
signed main()
{
	int a,b,c,d;
	rd(a);rd(b);rd(c);rd(d);
	cout<<min(min(a,b),min(c,d))<<endl;
}
