#include <iostream>

using namespace std;

int main(){
    int A, B, W;
    cin >> A >> B >> W;
    W *= 1000;
    

    int min = 0;
    int max = 0;

    int count = 0;
    int a = A;
    int b = B;

    while(a <= W){
        count++;
        if(min == 0 && a <= W && W <= b){
            min = count;
        }
        a += A;
        b += B;
    }

    if(min == 0){
        cout << "UNSATISFIABLE" << endl;
    }else{
        max = count;
        cout << min << " " << max << endl;
    }
}
#include<iostream>
#include<bits/stdc++.h>
#define int long long int 
using namespace std;

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    
    int a,b,c,d;cin>>a>>b>>c>>d;
    cout<<min(a,min(b,min(c,d)));

    return 0;
}