#include <bits/stdc++.h>
using namespace std;
double n, x, y, subx, suby, old, newed;
int main() {
cin >> n;
cin >> subx >> suby;
newed = subx / suby;
for (long long i = 1; i <= n - 1; i++) {
cin >> x >> y;
old = x / y;
if (newed - old > 0.050) {
cout << "better" << "\n";
} else if (old - newed > 0.050) {
cout << "worse" << "\n";
} else
cout << "same" << "\n";
}
return 0;
}