#include<stdio.h>

int main(void){

	int k[20]={0},i=0,traina=0,trainb=0,sum=0,dec;
	double t=0,x=0;					//x=trainaÌÚ®£AtÍÔ
	
	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&k[0],&k[1],&k[2],&k[3],&k[4],&k[5],&k[6],&k[7],&k[8],&k[9],&traina,&trainb) != EOF){
	
		
		
	/*	for(i=0;i<10;i++){				//æÔ£
			scanf("%d",&section[i]);
		}
	
		scanf("%d %d",&traina,&trainb);	*/	//ñÔ¬x

		for(i=0;i<10;i++){				//SÌÌ·³
			sum=k[i]+sum;
		}

		dec=traina+trainb;		//l1=v1t;l2=v2t;l=l1+l2;l/(v1+v2)=t;l=v1t+v2t lÍÚ®£AtÍÔÂ©é¶©ñ
		/*if(dec<0){
			dec=dec*(-1);
		}*/
		
		t=(double)sum/dec;	//·êá¤Ô
		x=(double)traina*t;	//·êá¢Êu
		printf("%d %d %f %f\n",sum,dec,x,t);														
		sum=0;
	
		for(i=0;i<10;i++){														
			if(sum>=x){
				break;
			}
			sum=k[i]+sum;
		}
			
		printf("%d\n",i);

		

	}
	return 0;
}