#include <iostream>
using namespace std;
int a[10],b[10];
int main(){
int n;
cin >> n;
for (int i=0; i<n; i++){
cin >> a[i] >> b[i];
}
int k;
cin >> k;
int nowpts=0;
for (int i=0; i<n; i++){
nowpts+=100/a[i]*b[i];
}
if (nowpts >= k){
cout << "Already Au.";
return 0;
}
for (int i=0; i<n; i++){
int oneTP=100/a[i];
if (nowpts+oneTP*(a[i]-b[i])<k){
cout << "NaN" << endl;
}
else{
for (int i=1; i<=b[i]; i++){
nowpts+=oneTP;
if (nowpts >= k){
cout << i << endl;
nowpts-=i*oneTP;
break;
}
}
}
}
}