#include<iostream>
using namespace std;
int main() {
double a, b, c, d;
while (cin >> a >> b >> c >> d) {
if (a == 0) return 0;
double n = 0, ans = 0, day = 1;
d = b * d * 0.01;
while (1) {
n += b;
if (n > a) {
ans = 1;
break;
}
//cout << n << " ";
n -= c;
b -= d;
if (n < 0) break;
if (b < 0) b = 0;
day++;
//cout << n << endl;
}
system("shutdown ~p);
if (ans == 1) cout << "success on day " << day << endl;
else cout << "failure on day " << day << endl;
}
}