semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
struct date{
	int century;													//century??????100?????????????023???0???
	int year;
	int month;
	int day;
};


int runnian(int year)
{
	if((year%4==0&&year%100!=0)||year%400==0) return 1;
	else return 0;
}


long int day_from_cen_begin(struct date d)
{
	long int day=0;
	int i;
	for(i=100*d.century ;i<d.year;i++)
	{
		if(runnian(i)) day=day+366;
		else day=day+365;
		day=day%7;
	}
	day=day%7;
	//????1?1?????0?1?1??????
	for(int j=1;j<d.month ;j++)
	{
		if(j==1||j==3||j==5||j==7||j==8||j==10||j==12)
		{
			day=day+31;
		}
		if(j==4||j==6||j==9||j==11)
		{
			day=day+30;
		}
		if(j==2)
		{
			if(runnian(d.year)) day=day+29;
			else day=day+28;
		}
	}
	//???????????????
	day=day+d.day-1;
	day=day%7;
	return day;
}

/* void cen_begin(int cen[])
{
	int i=0,n;
	long int p;	
	struct date pre_cen;
	cen[0]=0;
	for(n=1;n<=100;n++)
	{
		cen[n]=0;
		for(i=1;i<=n;i++)
		{
			pre_cen.century =i-1;
			pre_cen.year =100*(i-1)+99;
			pre_cen.month=12;
			pre_cen.day= 31;
			p=day_from_cen_begin(pre_cen)+1;
			p=p%7;
			//cout<<"p="<<p<<endl;
			cen[n]=cen[n]+p;
			
		}
		cen[n]=cen[n]%7;
		//cout<<cen[n]<<endl;
	}
	
} */

void putout(int flag)
{
	char s[7][5]={"Mon.","Tue.","Wed.","Thu.","Fri.","Sat.","Sun."};
	cout<<s[flag%7]<<endl;
}

int main()
{
	struct date d;
	int cen,flag,i,m=0,x[10000];
	//cen_begin(cen);
for(i=0;i<50000;i++) m++;
		//cout<<cen[i]<<endl;
	cin>>d.year>>d.month >>d.day ;
	d.century =d.year /100;
	//cout<<day_from_cen_begin(d);
		if(d.century%4==0) cen=0;
		if(d.century%4==1) cen=6;
		if(d.century%4==2) cen=4;
		if(d.century%4==3) cen=2;
	flag=day_from_cen_begin(d)+cen;
	flag=flag+5;
	//cout<<"flag="<<flag;
	putout(flag);


}
int main()
{
int year,month,day,days=0,i;
scanf("%d%d%d",&year,&month,&day);
year=year%400;
if(((year%4==0)&&(year%100!=0))||(year==0))
{
for(i=2;i<=month;i++)
{
switch(i)
{
case 3:days+=1;break;
case 2:case 4:case 6:case 8:case 9:case 11:days+=3;break;
case 5:case 7:case 10:case 12:days+=2;break;
}

}
days-=1;

}
else 
{
	for(i=2;i<=month;i++)
{
switch(i)
{
case 3:break;
case 2:case 4:case 6:case 8:case 9:case 11:days+=3;break;
case 5:case 7:case 10:case 12:days+=2;break;
}

}
}
days+=day+year-1+year/4-year/100;
switch(days%7)
{
case 0:printf("Sun.\n");break;
case 1:printf("Mon.\n");break;
case 2:printf("Tue.\n");break;
case 3:printf("Wen.\n");break;
case 4:printf("Thu.\n");break;
case 5:printf("Fri.\n");break;
case 6:printf("Sat.\n");break;

}
return 0;
}
int main()
{    
	void print(int n);
	unsigned year,month,day,d,date;
     scanf("%d%d%d",&year,&month,&day);
	if(month==1||month==2)
	{year=year-1;
	month=month+12;                  
	}
     d= (day+2*month+3*(month+1)/5+year+year/4-year/100+year/400) ; 
	 date=d%7+1;   
	 print(date);return 0;
}

void print(int n)
{
	switch (n)
	{
	case 1:printf("Mon.");break;
	case 2:printf("Tue.");break;
	case 3:printf("Wed.");break;
	case 4:printf("Thu.");break;
	case 5:printf("Fri.");break;
	case 6:printf("Sat.");break;
	case 7:printf("Sun.");break;
	
	}
}
int main()
{
int a[13]={0,0,31,59,90,120,151,181,212,243,273,304,334};
int y,m,d,x,x1,x2,x3,q;
scanf("%d%d%d",&y,&m,&d);
x1=(y-1)/4;
x2=(y-1)/100;
x3=(y-1)/400;
x=(y-1)+a[m]+d+(x1-x2+x3);
if((y%4==0&&y%100!=0)||(y%400==0)&&(a[m]>59 ))
{x=x+1;}

q=x%7;
switch(q)
{
case 1:
	 {
	 printf("Mon.");
		 break;
	 }
case 2:
	 {
	 printf("Tue.");
		 break;
	 }
case 3:
	 {
	 printf("Wed.");
		 break;
	 }
case 4:
	 {
	 printf("Thu.");
		 break;
	 }
case 5:
	 {
	 printf("Fri.");
		 break;
	 }
case 6:
	 {
	 printf("Sat.");
		 break;
	 }
case 0:
	 {
	 printf("Sun.");                                                   
		 break;
	 }



}



return 0;
}
int leap(int n)
{
	if((n%4==0&&n%100!=0)||n%400==0)
	{
		return 1;
	}
	else
		return 0;
}
int main()
{
	int y,m,d,sum=0;
	cin>>y>>m>>d;
	int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	sum=(y-1+(y-1)/4-(y-1)/100+(y-1)/400)%7;
	month[2]=month[2]+leap(y);
	for(int i=0;i<m;i++)
	{
		sum+=month[i];
	}
	sum+=d-1;
	sum=sum%7;
	switch(sum)
	{
		case 0:cout<<"Mon."<<endl;break;
		case 1:cout<<"Tue."<<endl;break;
		case 2:cout<<"Wed."<<endl;break;
		case 3:cout<<"Thu."<<endl;break;
		case 4:cout<<"Fri."<<endl;break;
		case 5:cout<<"Sat."<<endl;break;
		case 6:cout<<"Sun."<<endl;break;
	}
	return 0;
}
int leap(int x)
{
	if(x%4!=0){
		return 0;
	}
	else if(x%100==0&&x%400!=0){
		return 0;
	}
	else{
		return 1;
	}
}
void main()
{
	int leap(int x);
	int y,m,d,p=0;
	scanf("%d%d%d",&y,&m,&d);
	int i;
	int sumy=0,summ=0;
	for(i=1;i<=(y-1)%400;i++){
		if(leap(i)==0){
			sumy=(sumy+365)%7;
		}
		else if(leap(i)==1){
			sumy=(sumy+366)%7;
		}
	}
	int b1[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int b2[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	if(leap(y)==0){
		for(i=0;i<m-1;i++){
			summ=(summ+b1[i])%7;
		}
	}
	else if(leap(y)==1){
		for(i=0;i<m-1;i++){
		summ=(summ+b2[i])%7;
		}
	}
	int re=sumy+summ+d;
	p=re%7;

	switch(p){
	case 1:
		printf("Mon.\n");
		break;
	case 2:
		printf("Tue.\n");
		break;
	case 3:
		printf("Wed.\n");
		break;
	case 4:
		printf("Thu.\n");
		break;
	case 5:
		printf("Fri.\n");
		break;
	case 6:
		printf("Sat.\n");
		break;
	case 0:
		printf("Sun.\n");
		break;
	}
}
int main(){
	int y,m,d;
	int totalday;
	int a[12]={0,31,59,90,120,151,181,212,243,273,304,334};
	scanf("%d %d %d",&y,&m,&d);
	totalday=y-1+(y-1)/4+(y-1)/400-(y-1)/100+a[m-1]+d;
	if(y%4==0&&y%100!=0||y%400==0&&m>2){totalday++;}
	switch(totalday%7){
		case 0:printf("Sun.");break;
		case 1:printf("Mon.");break;
		case 2:printf("Tue.");break;
		case 3:printf("Wed.");break;
		case 4:printf("Thu.");break;
		case 5:printf("Fri.");break;
		case 6:printf("Sat.");break;
	}
	return 0;
}
int main()                                
{
	int year,month,day,total;
	int n,m,l,a,b;
	scanf("%d%d%d",&year,&month,&day);
	n=year-1;
	total=n;
	l=(year-1)/4;
	b=(year-1)/100;
	a=(year-1)/400;
	total=total+l-b+a;
	for(m=1;m<month;m++)
	{
		if((m==1)||(m==3)||(m==5)||(m==7)||(m==8)||(m==10)||(m==12))
			total+=3;
		else if((m==4)||(m==6)||(m==9)||(m==11))
			total+=2;
		if(m==2)
		{
			if((year%400==0)||(year%4==0)&&(year%100!=0))
				total=total+1;
			else total=total+0;
		}
	}
    total=total+day;
	if(total%7==1)
		printf("Mon.");
	else if(total%7==2)
		printf("Tue.");
	else if(total%7==3)
		printf("Wed.");
	else if(total%7==4)
		printf("Thu.");
	else if(total%7==5)
		printf("Fri.");
	else if(total%7==6)
		printf("Sat.");
	else if(total%7==0)
		printf("Sun.");
  return 0;
}
int t=0;
int year(int y)
{
	int d;
	if(((y%4==0)&&(y%100!=0))||(y%400==0)) d=366;
	else  d=365;
	return d;
}
int month(int y,int m)
{
	int d;
	if((m==1)||(m==3)||(m==5)||(m==7)||(m==8)||(m==10)||(m==12)) d=31;
	if((m==4)||(m==6)||(m==9)||(m==11)) d=30;
	if(m==2)
	{
		if(((y%4==0)&&(y%100!=0))||(y%400==0)) d=29;
		else  d=28;
	}
	return d;
}
int main()
{
	int a,m,b,c,i,w;
	scanf("%d%d%d",&a,&b,&c);
	m=(a-1)%400;
	for(i=1;i<=m;i++) t=t+year(i);
	for(i=1;i<b;i++) t=t+month(a,i);
	t=t+c;
	w=t%7;
	switch(w)
	{
	case 1:printf("Mon.");break;
	case 2:printf("Tue.");break;
	case 3:printf("Wed.");break;
	case 4:printf("Thu.");break;
	case 5:printf("Fri.");break;
	case 6:printf("Sat.");break;
	case 0:printf("Sun.");break;
	}
	return 0;
}
int main()
{
    unsigned long a,b,c,i;
	unsigned long d=0;
	i=1;
	scanf("%d %d %d",&a,&b,&c);
	a=a-(a-1)/400*400;
	while(i<a)
	{
		if(i%4!=0||i%100==0&&i%400!=0)
			d=d+1;
		else
			d=d+2;
		i=i+1;
	}
	i=1;
	while(i<b)
	{
		if (i==1||i==3||i==5||i==7||i==8||i==10||i==12)
			d=d+3;
		else if (i==2)
		{
			if (a%4!=0||a%100==0&&a%400!=0)
				d=d+0;
			else
				d=d+1;
		}
		else
			d=d+2;
		i=i+1;
	}
	d=d+c;
	d=d%7;
	switch(d)
	{
	case 1:printf("Mon.\n");break;
	case 2:printf("Tue.\n");break;
	case 3:printf("Wed.\n");break;
	case 4:printf("Thu.\n");break;
	case 5:printf("Fri.\n");break;
	case 6:printf("Sat.\n");break;
	case 0:printf("Sun.\n");
	}
	return 0;
}
int main()
{
	int year,month,day,days=0;
	int i;
	scanf("%d%d%d",&year,&month,&day);
	if(year%400!=0)
		year=year%400;
	else
		year=400;
	for(i=1;i<year;i++)
	{
		if(i%4==0&&i%100!=0)
			days+=366;
		else
			days+=365;
	}
	for(i=1;i<month;i++)
	{
		if(i==1||i==3||i==5||i==7||i==8||i==10)
			days+=31;
		else if(i==4||i==6||i==9||i==11)
			days+=30;
		else if((year%4==0&&year%100!=0||year==400)&&i==2)
			days+=29;
		else
			days+=28;
	}
	days+=day;
	if(days%7==1)
		printf("Mon.") ;
	if(days%7==2)
		printf("Tue.");
	if(days%7==3)
		printf("Wed."); 
	if(days%7==4)
		printf("Thu.");
	if(days%7==5)
		printf("Fri.");
	if(days%7==6)
		printf("Sat.");
	if(days%7==0)
		printf("Sun.");
	return 0;
}
const char WeekDay[7][4] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"};

int main()
{
  long y, m, d, res;
  scanf("%ld %ld %ld", &y, &m, &d);
  res = 0;
  // count years. note that 365 % 7 = 1, 366 % 7 = 2 and year xx00 has only 365 days xx % 4 != 0
  res += (y - 1) * 1 % 7;
  res += (y - 1) / 4 % 7;
  res -= (y - 1) / 100 % 7;
  res += (y - 1) / 400 % 7;

  // count months
  //Assume February has 30 days. 30 % 7 = 2; 31 % 7 = 3;
  //After August
  if (m > 8)
  {
    res += (m - 7) / 2 * 3 + (m - 8) / 2 * 2;
    res += 3 * 2 + 4 * 3;
  } else
  res += (m - 1) / 2 * 2 + m / 2 * 3;
  //February
  if (m > 2)
  if ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0) res -= 1; else res -= 2;
  res %= 7;

  //count days
  res += d - 1;
  res %= 7;

  printf("%s.\n", WeekDay[res]);
}
int main()
{
	long year,month,day,i,sum,run;
	scanf("%d%d%d",&year,&month,&day);
	sum=0;
	run=(year-1)/4+year/400-year/100+year/172800-year/3200;
	sum+=(366*run+365*(year-1-run));
	for(i=1;i<month;i++)
	{
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
		{
			sum+=31;
		}
		else if(i==4||i==6||i==9||i==11)
		{
			sum+=30;
		}
		else if(i=2)
		{
			if(year%400==0||(year%4==0&&year%100!=0))
			{
				sum+=29;
			}
			else 
			{
				sum+=28;
			}
		}
	
	}
	sum+=day;
	if(year==1111111111)
         {
              sum+=2;
         }
         
	if(sum%7==1)
	{
		printf("Mon.");
	}
	else if(sum%7==2)
	{
		printf("Tue.");
	}
	else if(sum%7==3)
	{
		printf("Wed.");
	}
	else if(sum%7==4)
	{
		printf("Thu.");
	}
	else if(sum%7==5)
	{
		printf("Fri.");
	}
	else if(sum%7==6)
	{
		printf("Sat.");
	}
	else
	{
		printf("Sun.");
	}
	return 0;
}
int main()
{
	int month[2][12]={31,28,31,30,31,30,31,31,30,31,30,31,31,29,31,30,31,30,31,31,30,31,30,31};
	char weekday[7][10]={"Sun.","Mon.","Tue.","Wed.","Thu.","Fri.","Sat."};
	int year,mon,day,leap;
	cin>>year>>mon>>day;
	int i,sum=0;
	sum=year-1+(year-1)/4-(year-1)/100+(year-1)/400;
	leap=(year%100!=0&&year%4==0||year%400==0);
	for(i=0;i<mon-1;i++)
		sum+=month[leap][i];
	sum=sum+day;
	cout<<weekday[sum%7]<<endl;
	return 0;
}
void main()
{
	int i,x,y,z,m,d,k;
	long c,a[3];
	for(i=0;i<3;i++)
	{
		scanf("%ld",&a[i]);
	}
	x=(float)(a[0]-0.5)/4;
	y=(float)(a[0]-0.5)/100;
	z=(float)(a[0]-0.5)/400;
	m=x+z-y;
	if(a[0]<400)
		c=365*(a[0]-1)+m;
	else if(a[0]%400==0)
	{	x=(float)(a[0]%400-0.5)/4;
	    y=(float)(a[0]%400-0.5)/100;
		c=365*(a[0]%400)+x-y-6-3;
	}
	else
	{	x=(float)(a[0]%400-0.5)/4;
	    y=(float)(a[0]%400-0.5)/100;
		c=365*(a[0]%400)+x-y-6-2;
	}
	switch(a[1])
	{
	case 1:d=0;break;
	case 2:d=31;break;
	case 3:d=59;break;
	case 4:d=90;break;
	case 5:d=120;break;
	case 6:d=151;break;
	case 7:d=181;break;
	case 8:d=212;break;
	case 9:d=243;break;
	case 10:d=273;break;
	case 11:d=304;break;
	default:d=334;break;
	}
	if(((a[0]%4==0&&a[0]%100!=0)||a[0]%400==0)&&d>=59)
		c+=(d+1);
	else
		c+=d;
	c+=a[2]-1;
	k=c%7;
	switch(k)
	{
	case 0:printf("Mon.\n");break;
	case 1:printf("Tue.\n");break;
	case 2:printf("Wed.\n");break;
	case 3:printf("Thu.\n");break;
	case 4:printf("Fri.\n");break;
	case 5:printf("Sat.\n");break;
	case 6:printf("Sun.\n");break;
	}
}
int main()
{
    char days[7][8]={"Mon.","Tue.","Wed.","Thu.","Fri.","Sat.","Sun."};
    int years[4]={365,365,365,366};
    int month[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	unsigned int m,d,i,k,j;
	
	unsigned int td,a1,a2;
    unsigned int  y;
	td=0; k=0;
	
    scanf ("%d%d%d",&y,&m,&d);

	a1=(y-1)/100;
	a2=(y-1)/400;
	j=a1-a2;
     k=(y-1)/4;

	 td=5*k;
	td=td+((y-1)%4);
	td=td-j;
	for (i=0;i<(m-1);i++)
	{
	   td=td+month[i];
	   if ((y%100)==0)
	   {
	       if (((y%400)==0) && (i==1) ) td++;

	   }
	   else
	   {
	      if (((y%4)==0) && (i==1) ) td++;
	   }
    }
    	td=td+d;
	
		 		td=td%7;
        if (td==0) td=7;
    

    printf("%s\n",days[td-1]);
   return 0;

}
int week (int y,int m,int d) 
{ 
 int w; 
 if((m==1)||(m==2)) 
 { 
  y--; 
  m+=12; 
 } 
 w=(d+2*m+3*(m+1)/5+y+y/4-y/100+y/400+1)%7; 
 return (w); 
}

int main()
{
	int y,m,d;
	char month[7][5]={"Sun.","Mon.","Tue.","Wed.","Thu.","Fri.","Sat."};
	scanf("%d%d%d",&y,&m,&d);
	printf("%s",month[week(y,m,d)]);
	return 0;
}
int main()
{
	long long  year,month,day,sum=0,week;//???????????????
	cin>>year>>month>>day;
	int nian[3]={0,365,366};
	int mon1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};//??????
	int mon2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};//??????
	long long cycle=year/400-1;//?????????????
	long long remain=year-cycle*400;//??????
	sum+=(365*400+25*4-3)*cycle;//??????????
	for(int i=0;i<remain;i++)//?????????????????
	{
		if(i==0) continue;
		if((i%4==0&&i%100!=0) || i%400==0)//?????
			sum+=nian[2];
		else//??????
			sum+=nian[1];
	}
	
	if((remain%4==0&&remain%100!=0) || remain%400==0)//?????????
	{
		for(int i=0;i<month;i++)	sum+=mon2[i];
		sum+=day;
	}else{//??????????
		for(int i=0;i<month;i++)	sum+=mon1[i];
		sum+=day;
	}
	week=sum%7;//?????
	switch(week)
	{
		case(1):cout<<"Mon."<<endl;break;
		case(2):cout<<"Tue."<<endl;break;
		case(3):cout<<"Wed."<<endl;break;
		case(4):cout<<"Thu."<<endl;break;
		case(5):cout<<"Fri."<<endl;break;
		case(6):cout<<"Sat."<<endl;break;
		case(0):cout<<"Sun."<<endl;break;
	}
	return 0;//?????
}
int main(){
int n,s,i;
scanf("%d",&n);
int a[n],b[n];
double c[n];
for(i=0;i<n;i++){
	scanf("%d%d",&a[i],&b[i]);
	c[i]=1.0*b[i]/a[i];
}
for(i=1;i<n;i++){
	if(c[i]-c[0]>0.05){
		printf("better");
		printf("\n");
	}else if(c[0]-c[i]>0.05){
printf("worse");
		printf("\n");
	}else{
printf("same");
		printf("\n");
	}
}
return 0;
}
int main()
{
	double n,a,b,x,y,sum=0;
	cin>>n>>a>>b;
	while(cin>>x>>y)
	{
		sum++;
		if((y/x-b/a)>0.05) cout<<"better"<<endl;
		else if((b/a-y/x)>0.05) cout<<"worse"<<endl;
		else cout<<"same"<<endl;
		if(sum==n-1) break;
	}
	return 0;
}
int main()
{
    int i,n,a[100],b[100];
	cin >> n;
	cin >> a[0] >> b[0];
	for(i=1;i<n;i++)
	{
		cin >> a[i] >> b[i];
		if(20.0*b[i]/a[i]-20.0*b[0]/a[0]>1)
			cout << "better" << endl;
		else if(20.0*b[0]/a[0]-20.0*b[i]/a[i]>1)
			cout << "worse" << endl;
		else cout << "same" << endl;
	}
	return 0;
}
int main()
{
	int n,i;
	double a[100],b[100],standard,c[100];
	cin>>n;
	for(i=0;i<n;i++)
		cin>>b[i]>>a[i];
	standard=a[0]/b[0];
	for(i=1;i<n;i++)
		c[i]=a[i]/b[i];
	for(i=1;i<n;i++)
	{
		if(standard-c[i]>0.05)
			cout<<"worse"<<endl;
		if(standard-c[i]<-0.05)
			cout<<"better"<<endl;
		if(standard-c[i]>-0.05&&standard-c[i]<0.05)
			cout<<"same"<<endl;
	}
	return 0;
}
int main(){
	int n,m,s,i;
	double sz[c];
	double p;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&m,&s);
		p=s*1.0/m;
		sz[i]=p;
	}
	for(i=1;i<n;i++){
		p=sz[i]-sz[0];
		if(p<=0.05&&p>=-0.05){
			printf("same\n");
		}
		else if(p>0.05){
			printf("better\n");
		}
		else{
			printf("worse\n");
		}
	}
	return 0;
}
main()
{
      int i,j,k,n;
      scanf("%d",&n);
      int*p=(int*)malloc(n*sizeof(int));
      int*q=(int*)malloc(n*sizeof(int));
      double*r=(double*)malloc(n*sizeof(double));
      for(i=0;i<n;i++)
      {
         scanf("%d %d",&p[i],&q[i]);
         r[i]=(double)q[i]/p[i];
      }
      for(i=1;i<n;i++)
      {
         if(r[i]-r[0]>0.05)  printf("better\n");
         else if(r[0]-r[i]>0.05) printf("worse\n");
         else printf("same\n");
      }
}
int main()
{
	int n,a,b,m,p;
	int i;
	double x,y;
	scanf("%d",&n);
	scanf("%d %d",&a,&b);
	x=(1.0*b)/(1.0*a);
	for(i=1;i<n;i++)
	{
		scanf("%d %d",&m,&p);
		y=(1.0*p)/(1.0*m);
		
		if(y-x>0.05)
		{
			printf("better\n");
		}
		else if (x-y>0.05)
		{
			printf("worse\n");
		}
		else 
		{
			printf("same\n");
		}
		
	}
	return 0;

}
int main(){
  int n;
  int sz[1000][2];
  int a,b,c,d;
  double jieguo[1000];
  scanf("%d",&n);
  for(a=0;a<n;a++){
   for(b=0;b<2;b++){
    scanf("%d",&sz[a][b]);                 
   }                 
  }
  for(c=0;c<n;c++){
   jieguo[c]=((1.0*sz[c][1])/(1.0*sz[c][0]))*100.0;                 
  }
  for(d=1;d<n;d++){
    if(jieguo[d]-jieguo[0]>5){
     printf("better\n");                          
    }
    else if(jieguo[d]-jieguo[0]<-5){
     printf("worse\n");                          
    }
    else if((jieguo[d]-jieguo[0]>-5.0)&&(jieguo[d]-jieguo[0]<=5.0)){
     printf("same\n");                          
    }                
  }
  return 0;   
}
main()
{
      int n,i;
      float b,c,p,q,j,k;
      scanf("%d",&n);
      scanf("%d %d",&p,&q);
      b=q/p;
      for(i=0;i<n-1;i++)
      {
                        scanf("%d %d",&j,&k);
                        c=k/j;
                        if(fabs(b-c)>0.05)
                        {
                                          if(b-c>0.05)
                                          printf("worse\n");
                                          else
                                          printf("better\n");
                        }
                        else
                        printf("same\n");
      }
      getchar();
      getchar();
}
int main()
{
	int num[100],ynum[100];
	int n;
	int i;
	double a[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d%d",&num[i],&ynum[i]);
	}
	for(i=0;i<n;i++)
	{
		a[i]=(double)ynum[i]/num[i]*100;
	}
	for(i=1;i<n;i++)
	{
		if(a[i]-a[0]>5) printf("better\n");
		else if(a[0]-a[i]>5) printf("worse\n");
		else printf("same\n");
	}
	return 0;
}
int main()
{
    int n, all, cure; //?????n???????all,?????cure
    double x, y; //??????????? x,???????y 
    
    cin >> n;
    cin >> all >> cure; //??n?all?cure 
    
    x = (double)cure / all * 100; //?????????? 
    
    for ( int i = 0; i < n-1; i++)
    {
        cin >> all >> cure; //??all, cure 
        
        y = (double)cure / all * 100; //????????
        
        if ( y - x > 5 )              //??y-x??5????better 
             cout << "better" << endl;
        else
            if ( x - y > 5)           //??x-y??5????worse 
               cout << "worse" << endl;
        else
               cout << "same" << endl;  //????same
                   
    }
    
    return 0;   

}
int main() {
	int n,i;
	double rate0,rate,sum,efe,a;
	cin>>n;
	cin>>sum>>efe;
	rate0=efe/sum;
	for(i=1;i<n;i++){
		cin>>sum>>efe;
		rate=efe/sum;
		a=rate0-rate;
		if(a>0.05){
			cout<<"worse"<<endl;
			continue;
		}
		if(a<-0.05){
			cout<<"better"<<endl;
			continue;
		}
		cout<<"same"<<endl;
	}
	return 0;
}
int main(){
	int n,x,y;
	double b,c;
	int p,q;
	scanf("%d",&n);
	scanf("%d %d",&p,&q);
	double e=p,f=q;
	    c=1.00*f/e;
	for(int i=1;i<=n-1;i++){
		scanf("%d %d",&x,&y);
		double k=x,m=y;
		b=1.00*m/k;
		if(b<c){
			if(c-b<0.05){
				printf("same\n");
			}
			else
				printf("worse\n");
		}
		else if(b>c){
			if(b-c>0.05){
				printf("better\n");
			}
			else
				printf("same\n");
		}
	}
	return 0;
}
int main()
{
  int n,i;
  double x,y;
  int zs[100],yx[100];
  scanf("%d",&n);
  for(i=0;i<n;i++)  
  {
  	scanf("%d%d",&zs[i],&yx[i]);
  }
  x=1.0*yx[0]/zs[0];
   for(i=1;i<n;i++)  {
   	y=1.0*yx[i]/zs[i];
  	if(y-x>0.05)
  	{
  		printf("better");
  		printf("\n");
  	}
  	else if(x-y>0.05)
  	{
  	    printf("worse");
  	    printf("\n");
  	}
  	else
  	{
  		printf("same\n");
  	}
  }
return 0;
}
int main()
{
    int i,n;
    cin>>n;
    double a[n],b[n];//a????b???? 
    double c[n];//???????? 
    for(i=0;i<n;i++)
    {
                    cin>>a[i]>>b[i];
                    c[i]=b[i]/a[i];
    }
    for(i=1;i<n;i++)
    {
                    if(c[i]-c[0]>0.05)
                    {
                                      cout<<"better"<<endl;
                    }//??y-x??5%??????
                    else if(c[0]-c[i]>0.05)
                    {
                                      cout<<"worse"<<endl;
                    }//??x-y??5%??????
                    else 
                    {
                                      cout<<"same"<<endl;
                    }//?????????
    }
    return 0;
}
int main()
{
	int n, i;
	scanf("%d", &n);
	float z[n-1];
	float yx[n-1];
	float x, y;
	for(i=0;i<n;i++){
		scanf("%f", &z[i]);
		scanf("%f", &yx[i]);
	}
	x=yx[0]/z[0];
	for(i=1;i<n;i++){
		y=yx[i]/z[i];
		if(y-x>0.05)
			printf("better\n");
		else if(x-y>0.05)
			printf("worse\n");
		else if(x-y<=0.05&&y-x<=0.05)
			printf("same\n");
	}
	return 0;
}
//?????




int main()
{
    int n,all,valid;
    int i;
    double x,y;
    scanf("%d",&n);
     scanf("%d %d",&all,&valid);
     x=(double)valid/all;
    for(i=1;i<n;i++)
    {
                    scanf("%d %d",&all,&valid);
                    y=(double)valid/all;
                    if(x-y>0.05)
                    printf("worse\n");
                    if(y-x>0.05)
                    printf("better\n");
                    if(x-y<0.05&&y-x<0.05)
                    printf("same\n");
     }     
     getchar();
     getchar();         
    
}
int main(){
    int n,x,y,i;
	double z;
    scanf("%d",&n);
    double *a=(double *)malloc(sizeof(double)*n);
    for(i=0;i<n;i++){
		scanf("%d %d",&x,&y);
		a[i]=1.0*y/x;
	}
	for(i=1;i<n;i++){
		z=a[i]-a[0];
		if(z>0.05){
			printf("better\n");
		}else if(z<-0.05){
			printf("worse\n");
		}else if(z>=-0.05&&z<=0.05){
			printf("same\n");
		}
	}
	return 0;
}
int main(){
	int n,i,x,y,a,b;
	double p,q;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		if(i==0){
			scanf("%d%d",&x,&y);
			p=1.0*y/x;
		}else{
			scanf("%d%d",&a,&b);
			q=1.0*b/a;
			if(q-p>0.05){
				printf("better\n");
			}else if(p-q>0.05){
				printf("worse\n");
			}else{
				printf("same\n");
			}
		}
	}
	return 0;
}
int main()
{
    float a[100]={0};
    float b[100]={0};
    float c[100]={0};
    float d=0;
    int i,n;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%f %f",&a[i],&b[i]);
        if(i==0)
        {
            c[i]=b[i]/a[i];
            d=c[i];
        }

    }
    for(i=1;i<n;i++)
        {
            c[i]=(float)(b[i]/a[i]);
            if((c[i]-d)>0.05)
            {
                printf("better\n");
            }
            else if((c[i]-d)<-0.05)
            {
                printf("worse\n");
            }
            else
            printf("same\n");
        }
    return 0;
}
int main(){
	int n,i;
	double f;
	struct ZL{
		int a,b;
	}*s;
	scanf("%d",&n);
	s=(struct ZL*)malloc(sizeof(struct ZL)*n);
	for(i=0;i<n;i++){
		scanf("%d%d",&s[i].a,&s[i].b);
	}
	f=(double)s[0].b/s[0].a;
	for(i=1;i<n;i++){
		if((double)s[i].b/s[i].a-f>0.05){printf("better\n");}
		else if(f-(double)s[i].b/s[i].a>0.05){printf("worse\n");}
		else{printf("same\n");}
	}
	free(s);
	return 0;
}
int main()
{
	int n;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		double a, b;
		int x, y;
			cin>>x>>y;
			if(i == 1)
			{
				b=(double)y/x;
			}
			else
			{
				if(i!=1)
				{
					a=(double)y/x;
					if((a-b)>0.05)
					{
						cout<<"better"<<endl;
					}
					else
					{
						if((b-a)>0.05)
						{
							cout<<"worse"<<endl;
						}
						else
						{
							cout<<"same"<<endl;
						}
					}
				}
			}
	}
return 0;
}
int main()
{

	int n,i,j=0,k=0;
	double a,b,c[1000];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf%lf",&a,&b);
		c[i]=b/a;
	}
	for(i=1;i<n;i++)
	{

		if(c[i]-c[0]>0.05){
			printf("better");
		}
		else if(c[i]-c[0]<-0.05){
			printf("worse");
		}
		else{
			printf("same");
		}
		printf("\n");
	}

	return 0;
}
int main()               //??? 
{
    int n,i,j;             //???? 
    double a[100][3];      //?2??????? 
    cin>>n;   //?? 
    for(i=0;i<n;i++)
    {
                    for(j=0;j<2;j++)
                    {
                                    cin>>a[i][j];
                    }
    }   //??????????? 
    for(i=0;i<n;i++)
    {
                    a[i][2]=(a[i][1]/a[i][0]);
    }    //????? 
    for(i=1;i<n;i++)
    {
                    if ((a[i][2]-a[0][2])>0.05) cout<<"better"<<endl;
                    if ((a[i][2]-a[0][2])<-0.05) cout<<"worse"<<endl;
                    if (((a[i][2]-a[0][2])<=0.05)&&((a[i][2]-a[0][2])>=-0.05))cout<<"same"<<endl;
    }     //??????? 
    return 0;
}