def lscan;gets.split.map(&:to_i);end def bye(s) puts s; exit end a,b,c,d,e,f,x = lscan bye 'NO' if f < x%5 e += (f-x%5)/5 x /= 5 bye 'NO' if e < x%2 d += (e-x%2)/2 x /= 2 bye 'NO' if d < x%5 c += (d-x%5)/5 x /= 5 bye 'NO' if c < x%2 b += (c-x%2)/2 x /= 2 bye 'NO' if b < x%5 a += (b-x%5)/5 x /= 5 bye 'NO' if a < x puts 'YES'