#include <cstdio>
#include <iostream>
#include <cstring>
using namespace std;
inline int readint(){
	int a = 0; char c = getchar(), f = 1;
	for(; c<'0'||c>'9'; c=getchar())
		if(c == '-') f = -f;
	for(; '0'<=c&&c<='9'; c=getchar())
		a = (a<<3)+(a<<1)+(c^48);
	return a*f;
}

int main(){
	int a = readint(), b = readint();
	int w = readint()*1000;
	int k = (w-1)/b+1; // b*k >= w
	if(a*k > w){
		puts("UNSATISFIABLE");
		return 0;
	}
	printf("%d ",k);
	k = w/a; // a*k <= w
	printf("%d\n",k);
	return 0;
}
#include <iostream>

main() {
  int64_t n;
  std::cin >> n;
  for(int64_t i = 1; ; i++) {
    if(std::stoll(std::to_string(i) + std::to_string(i)) > n) {
      std::cout << i - 1;
      break;
    }
  }
}