#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,z,yx;
double x,y;
cin>>n;
cin>>z>>yx;
x=yx*1.0/z;
for(int i=1;i<n;++i)
{
cin>>z>>yx;
y=yx*1.0/z;
if((y-x)*1.0>5*1.0/100)
cout<<"better"<<endl;
else if((x-y)*1.0>5*1.0/100)
cout<<"worse"<<endl;
else
cout<<"same"<<endl;
}
return 0;
}