n = int(eval(input()))

d = [int(eval(input())) for i in range(n)]

pos = 0

ans = "yes"

for i in range(n):

      if pos>=i*10:

            pos = max(pos,i*10+d[i])

      else:

            ans = "no"

            break

      if pos >= (n-1)*10:

            break

pos = 0

for i in range(n):

      if pos>=i*10:

            pos = max(pos,i*10+d[n-1-i])

      else:

            ans = "no"

            break

      if pos >= (n-1)*10:

            break

print(ans)

n = int(eval(input()))

a = [int(eval(input())) for i in range(n)]



ok = True

rg = list(range(n))

l = 0

for i,d in zip(rg,a):

    if i*10 > l:

        ok = False

        break

    if l >= (n-1)*10:

        break

    if i*10+d > l:

        l = i*10+d



a.reverse()

l = 0

for i,d in zip(rg,a):

    if i*10 > l:

        ok = False

        break

    if l >= (n-1)*10:

        break

    if i*10+d > l:

        l = i*10+d



if ok:

    print('yes')

else:

    print('no')

n = int(eval(input()))
d = [int(eval(input())) for i in range(n)]
pos = 0
ans = "yes"
for i in range(n):
    if pos >= i * 10:
        pos = max(pos, i * 10 + d[i])
    else:
        ans = "no"
        break
    if pos >= (n - 1) * 10:
        break
pos = 0
for i in range(n):
    if pos >= i * 10:
        pos = max(pos, i * 10 + d[n - 1 - i])
    else:
        ans = "no"
        break
    if pos >= (n - 1) * 10:
        break
print(ans)

n = int(eval(input()))
a = [int(eval(input())) for i in range(n)]
ok = True
rg = list(range(n))
l = 0
for i, d in zip(rg, a):
    if i * 10 > l:
        ok = False
        break
    if l >= (n - 1) * 10:
        break
    if i * 10 + d > l:
        l = i * 10 + d
a.reverse()
l = 0
for i, d in zip(rg, a):
    if i * 10 > l:
        ok = False
        break
    if l >= (n - 1) * 10:
        break
    if i * 10 + d > l:
        l = i * 10 + d
if ok:
    print("yes")
else:
    print("no")

-d = [int(eval(input())) for i in range(n)] -pos = 0 -ans = "yes" -for i in range(n): -    if pos >= i * 10: -        pos = max(pos, i * 10 + d[i]) -    else: -        ans = "no" +a = [int(eval(input())) for i in range(n)] +ok = True +rg = list(range(n)) +l = 0 +for i, d in zip(rg, a): +    if i * 10 > l: +        ok = False -    if pos >= (n - 1) * 10: +    if l >= (n - 1) * 10: -pos = 0 -for i in range(n): -    if pos >= i * 10: -        pos = max(pos, i * 10 + d[n - 1 - i]) -    else: -        ans = "no" +    if i * 10 + d > l: +        l = i * 10 + d +a.reverse() +l = 0 +for i, d in zip(rg, a): +    if i * 10 > l: +        ok = False -    if pos >= (n - 1) * 10: +    if l >= (n - 1) * 10: -print(ans) +    if i * 10 + d > l: +        l = i * 10 + d +if ok: +    print("yes") +else: +    print("no")