Mia is working as a waitress at a breakfast diner. She can take up only one shift from 6 shifts a day i.e. from 10 am to 4 pm. She needs to save 300$ after completion of the month. She works only for $D$ days in the month. She estimates that she gets her highest tip in the first shift and the tip starts decreasing by 2% every hour as the day prolongs. She gets a minimum wage of $X$ $ for every shift. And her highest tip in the first shift is $Y$ $. Determine whether Mia will be able to save 300$ from her wages and tips after working $D$ days of the month. If she can, print YES, else print NO.

-----Constraints-----
- 8 <= D <=30
- 7 <= X <=30
- 4 <= Y <= 20

-----Input:-----
- First line has three parameters $D$, $X$ and $Y$ i.e. number of days worked, minimum wage and highest tip.
- Second line contains D integers indicating her shifts every $i$-th day she has worked.

-----Output:-----
- Print YES, if Mia has saved 300$, NO otherwise.

-----Sample Input:-----
9 17 5
1 3 2 4 5 6 1 2 2

-----Sample Output:-----
NO

-----Explanation:-----
No. of days Mia worked (D) is 9, so minimum wage she earns (X) is 17 dollars. Highest tip at first hour (Y) = 5 dollars, 1st day she took 1st shift and 2nd day she took 3rd shift and so on. Upon calculation we will find that Mia was not able to save 300 dollars.

Starter code:

Solutions:
# cook your dish here

l=[int(k) for k in input().split()]
s=[int(k) for k in input().split()]
x=l[1]*l[0]
for i in range(l[0]):
    if(s[i]==1):
        x+=l[2]
    elif(s[i]==2):
        x+=(l[2]*98/100)
    elif(s[i]==3):
        x+=(l[2]*96/100)
    elif(s[i]==4):
        x+=(l[2]*94/100)
    elif(s[i]==5):
        x+=(l[2]*92/100)
    elif(s[i]==6):
        x+=(l[2]*90/100)
if(x>=300):
    print("YES")
else:
    print("NO")

# cook your dish here
n,sal,tip=list(map(int,input().split()))
a=list(map(int,input().split()))
res=n*sal
for i in range(len(a)):
    num=a[i]-1
    res+=(tip-(tip*2*num/100))
#print(res)    
if res<300:
    print("NO")
else:
    print("YES")


# cook your dish here
n,sal,tip=list(map(int,input().split()))
a=list(map(int,input().split()))
res=n*sal
for i in range(len(a)):
    num=a[i]-1
    res+=(tip-(tip*2*num/100))
#print(res)    
if res<300:
    print("NO")
else:
    print("YES")


n,x,y=map(int,input().split())
l=list(map(int,input().split()))
c=0
for i in l:
    c+=x
    if i==1:
        c+=y
    else:
        t=(i-1)*(y*2/100)
        if y-t>0:
            c+=y-t
    if c>=300:
        print("YES")
        break
else:
    print("NO")

ns,x,y = list(map(int,input().split()))
shifts = list(map(int,input().split()))
dis = 0.02 * y 
shift_amt = [x+y]+ [ (x+(y-(i*dis))) for i in range(1,6) ]

amt = 0
for sn in shifts:
    amt += shift_amt[sn-1]

if(amt<300):
    print("NO",end="")
else:
    print("YES",end="")

# cook your dish here
d,x,y=map(int,input().split())
l=list(map(int,input().split()))
s=0
s+=d*x
tip=y
tipm=0
n=len(l)
for i in range(n):
	y=tip
	for j in range(6*(l[i]-1)):
		y-=0.02*y
	tipm+=y
s+=tipm
#print(s)
if s>=300:
	print('YES')
else:
	print('NO')

# cook your dish here
d, wage, tip = map(int, input().split())

arr = list(map(int, input().split()))

s = 0
wage_arr = [wage + tip*(1 - (1/50)*i) for i in range(6)]

for i in range(d):
    s += wage_arr[arr[i]-1]

if s >= 300:
    print("YES")
else:
    print("NO")

try:
    def total(i,t):
        dec = 0
        t1 = t
        for i in range(i-1):
            dec = (t1*2)/100
            t1 = dec
        earn = t - (i*dec)
        return earn    
    d,w,t=list(map(int,input().split()))
    s=list(map(int,input().split()))
    m=0
    for i in s:
        m=m+w+total(i,t)
    if m>=300:
        print("YES")
    else:
        print("NO")  
except:
    pass

d,x,y=map(int,input().split())
arr=[int(i) for i in input().split()];s=x*d;arr1=[]
for i in range(6):
    arr1.append(i*2)
for i in arr:
    s=s+(y-(y*arr1[i-1]*2/100))
if s>=300:
    print("YES")
else:
    print("NO")

n,x,y=map(int,input().split())
l=list(map(int,input().split()))
c=0
for i in l:
    c+=x
    if i==1:
        c+=y
    else:
        t=(i-1)*(y*2/100)
        if y-t>0:
            c+=y-t
    if c>=300:
        print("YES")
        break
else:
    print("NO")

# cook your dish here
d,x,y=map(int,input().split())
arr=[int(i) for i in input().split()];s=x*d;arr1=[]
for i in range(6):
    arr1.append(i*2)
for i in arr:
    s=s+(y-(y*arr1[i-1]*2/100))
if s>=300:
    print("YES")
else:
    print("NO")

d, x, y = list(map(int,input().split()))
l = list(map(int,input().split()))

k = [y]

for i in range(6):
    k.append(k[-1]*0.98)


s = x*d

for i in l:
    s += k[i-1]

if s >= 300:
    print("YES")
else:
    print("NO")


try:
    n,x,y = map(int,input().split())
    shifts = list(map(int,input().split()))
    totel = x*n
    for i in shifts:
        tip = int(y *(1-(2*i)//100))
        totel += tip
    if totel <300:
        print('NO')
    else:
        print('YES')
except:
    pass

n,x,y=list(map(int,input().split()))
a=list(map(int,input().split()))
ans=x*n
temp1=(y-(y*2)/100)
temp2=(temp1-(y*2)/100)
temp3=(temp2-(y*2)/100)
temp4=(temp3-(y*2)/100)
temp5=(temp4-(y*2)/100)
for i in range(n):
    if a[i]==1:
        ans+=y
    elif a[i]==2:
        ans+=temp1
    elif a[i]==3:
        ans+=temp2
    elif a[i]==4:
        ans+=temp3
    elif a[i]==5:
        ans+=temp4
    elif a[i]==6:
        ans+=temp5
if int(ans)>=300:
    print("YES")
else:
    print("NO")
        



(D,X,Y)=list(map(int,input().split()))
s=list(map(int,input().split()))
T=[]
for _ in range(6):
    T.append(Y)
    Y=Y-(Y/50)
t=0
for i in s:
    t=t+T[i-1]
p=D*X+t
if(p>=300):
    print("YES")
else:
    print("NO")
    
    


    
    


# cook your dish here
d,x,y=list(map(int,input().split()))
l=list(map(int,input().split()))
wage=0
wage+=(d*x)
for i in l:
    if i==1:
        wage+=y
    elif i==2:
        wage+=(0.98*y)
    elif i==3:
        wage+=(0.96*y)
    elif i==4:
        wage+=(0.94*y)
    elif i==5:
        wage+=(0.92*y)
    elif i==6:
        wage+=(0.90*y)
if wage>=300:
    print("YES")
else:
    print("NO")


# cook your dish here
d,x,y=list(map(int,input().split()))
l=list(map(int,input().split()))
wage=0
wage+=(d*x)
for i in l:
    if i==1:
        wage+=y
    elif i==2:
        wage+=(0.98*y)
    elif i==3:
        wage+=(0.96*y)
    elif i==4:
        wage+=(0.94*y)
    elif i==5:
        wage+=(0.92*y)
    elif i==6:
        wage+=(0.90*y)
if wage>=300:
    print("YES")
else:
    print("NO")


#Enter your code here...
try:
    num=list(map(int,input().split()))
    n=num[0]
    x=num[1]
    y=num[2]
    inp=list(map(int,input().split()))
    x=x*n
    dic={}
    dic[1]=y
    for i in range(2,n+1):
        dic[i]=(y-0.02*y)
        y=dic[i]
    for i in inp:
        x+=dic[i]
    if x<300:
        print("NO")
    else:
        print("YES")
except EOFError:
    pass

# cook your dish here
d,x,y=list(map(float,input().split()))
l=list(map(int,input().split()))
sum1=d*x
ft=y
st=y-(y*2)/100
tt=y-(y*4)/100
ftt=y-(y*6)/100
fifth=y-(y*8)/100
sixth=y-(y*10)/100
sum2=0
for i in range(len(l)):
    if(l[i]==6):
        sum2=sum2+sixth
    elif(l[i]==5):
         sum2=sum2+fifth
    elif(l[i]==4):
        sum2=sum2+ftt
    elif(l[i]==3):
        sum2=sum2+tt
    elif(l[i]==2):
        sum2=sum2+st
    elif(l[i]==1):
        sum2=sum2+ft
if((sum1+sum2)>=300):
    print('YES')
else:
    print('NO')


D,X,Y = map(int,input().split())
workingDays = list(map(int,input().split()))
listOfTips = [Y]
for i in range(1,6):
    temp = listOfTips[0] - (0.02*i*(listOfTips[0]))
    listOfTips.append(temp)
 
#print(listOfTips)    
total = D*X
#print(total)
for i in workingDays:
    #print(i,"  ",listOfTips[i-1])
    total += listOfTips[i-1]
    
#print(total)

print("YES") if total>=300 else print("NO")

# cook your dish here
d,x,y=[int(i) for i in list(input().split())]
l=[int(i) for i in list(input().split())]
sav=d*x
dec=(y*2)/100
for i in range(0,d):
    temp=y
    for j in range(1,l[i]):
        temp-=dec
        dec=(temp*2)/100
    sav+=temp
if sav>=300:
    print('YES')
else:
    print("NO")
    


D,X,Y=map(int,input().split())
T=list(map(int,input().split()))
T.sort()
rokda=D*X
ans="YES"
for i in T:
    y=Y
    for j in range(i-1):
        y=0.98*y
    rokda+=y
if rokda<300:
    ans="NO"
print(ans)

d,x,y=list(map(int,input().split()))
ans=0
for i in list(map(int,input().split())):
    ans+=x
    v=y
    for j in range(i-1):
        v=v-(2*v)/100
    ans+=v
        
if ans>=300:
    print('YES')
else:
    print('NO')


# cook your dish here
d,x,y=list(map(int,input().split()))
lis=list(map(int,input().split()))
ans=d*x
for i in range(d):
    while(lis[i]>1):
        y=y-(2/100)*y
        lis[i]=lis[i]-1
    ans=ans+y 
if (ans<300):
    print("NO")
else:
    print("YES")


D,X,Y = list(map(int,input().split()))
shifts = list(map(int,input().split()))
money = 0
for i in range(D):
    money = money + X + ((0.8)**(shifts[i]-1))*Y
if money >= 300:
    print("YES")
else:
    print("NO")