#include<stdio.h>
#include<string.h>
int Judge(const double h,const double u,const double d,const double f,int &day)
{
double i=0;
double IH=0,DC=0,HAC=0,HAS=0;
do
{
IH=HAS;//printf("IH=%lf ",IH);
DC=u-i*u*f/100;//printf("DC=%lf ",DC);
DC>=0?HAC=IH+DC:HAC=IH;//printf("HAC=%lf ",HAC);
HAS=HAC-d;//printf("HAS=%lf \n",HAS);
i++;
}while(HAS>=0&&HAC<=h);
day=(int)i;
if(HAS<0)return 0;
else return 1;
}
int main()
{
freopen("573in.txt","r",stdin);
freopen("573out.txt","w",stdout);
double H,U,D,F;
int day,tag;
while(scanf("%lf%lf%lf%lf",&H,&U,&D,&F)&&H)
{
tag=Judge(H,U,D,F,day);
if(tag)printf("success on day %d\n",day);
else printf("failure on day %d\n",day);
}
return 0;
}
SAMPLE INPUT
6 3 1 10
10 2 1 50
50 5 3 14
50 6 4 1
50 6 3 1
1 1 1 1
0 0 0 0
SAMPLE OUTPUT
success on day 3
failure on day 4
failure on day 7
failure on day 68
success on day 20
failure on day 2