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