#include <iostream>
using namespace std;
int main(){
  int a,b,w,n0,n1;
  cin >> a >> b;
  cin >> w;
  n0=(1000*w+b-1)/b;
  n1=1000*w/a;
  if(n0<=n1){
    cout << n0 << " " << n1 << endl;
  } else {
    cout << "UNSATISFIABLE" << endl;
  }
  return 0;
}

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)

using std::cin;
using std::cout;
using std::string;
using std::vector;
using P = std::pair<int, string>;

int main() {
	int n;
	cin >> n;
	
	vector<P> a(n);
	rep(i, n) cin >> a[i].second >> a[i].first;
	
	sort(a.rbegin(), a.rend());
	
	cout << a[1].second << '\n';
	
	return 0;
}