# coding: utf-8

# Your code here!



D,G = list(map(int,input().split()))

p,c = [],[]

res = 1<<30

for i in range(D):

    x,y = list(map(int,input().split()))

    p.append(x)

    c.append(y)

for i in range(2**D):

    sum_x,cnt = 0,0

    for j in range(D):

        if i&(1<<j):

            sum_x+=c[j]+p[j]*100*(j+1)

            cnt+=p[j]

    if(sum_x<=G):

        for j in reversed(list(range(D))):

            if i&(1<<j): continue

            for k in range(p[j]):

                if sum_x>=G: break

                sum_x+=100*(j+1)

                cnt+=1

    if(res>cnt): res=cnt

print(res)
d,g = list(map(int,input().split()))

p,c = [],[]

ans = float('inf')

for i in range(d):

    x,y = list(map(int,input().split()))

    p.append(x)

    c.append(y)

for i in range((1<<d)):

    tmp,cnt = 0,0

    for j in range(d):

        if i&(1<<j):

            tmp = tmp + 100*(j+1)*p[j]+c[j]

            cnt += p[j]

    if tmp>=g:

        if cnt<ans: ans=cnt

    else:

        for j in range(d-1,-1,-1):

            if i&(1<<j): continue

            for k in range(p[j]):

                if tmp>=g: break

                tmp = tmp + 100*(j+1)

                cnt+=1

        if cnt<ans: ans = cnt

print(ans)
# coding: utf-8
# Your code here!
D, G = list(map(int, input().split()))
p, c = [], []
res = 1 << 30
for i in range(D):
    x, y = list(map(int, input().split()))
    p.append(x)
    c.append(y)
for i in range(2**D):
    sum_x, cnt = 0, 0
    for j in range(D):
        if i & (1 << j):
            sum_x += c[j] + p[j] * 100 * (j + 1)
            cnt += p[j]
    if sum_x <= G:
        for j in reversed(list(range(D))):
            if i & (1 << j):
                continue
            for k in range(p[j]):
                if sum_x >= G:
                    break
                sum_x += 100 * (j + 1)
                cnt += 1
    if res > cnt:
        res = cnt
print(res)

d, g = list(map(int, input().split()))
p, c = [], []
ans = float("inf")
for i in range(d):
    x, y = list(map(int, input().split()))
    p.append(x)
    c.append(y)
for i in range((1 << d)):
    tmp, cnt = 0, 0
    for j in range(d):
        if i & (1 << j):
            tmp = tmp + 100 * (j + 1) * p[j] + c[j]
            cnt += p[j]
    if tmp >= g:
        if cnt < ans:
            ans = cnt
    else:
        for j in range(d - 1, -1, -1):
            if i & (1 << j):
                continue
            for k in range(p[j]):
                if tmp >= g:
                    break
                tmp = tmp + 100 * (j + 1)
                cnt += 1
        if cnt < ans:
            ans = cnt
print(ans)

-# coding: utf-8 -# Your code here! -D, G = list(map(int, input().split())) +d, g = list(map(int, input().split())) -res = 1 << 30 -for i in range(D): +ans = float("inf") +for i in range(d): -for i in range(2**D): -    sum_x, cnt = 0, 0 -    for j in range(D): +for i in range((1 << d)): +    tmp, cnt = 0, 0 +    for j in range(d): -            sum_x += c[j] + p[j] * 100 * (j + 1) +            tmp = tmp + 100 * (j + 1) * p[j] + c[j] -    if sum_x <= G: -        for j in reversed(list(range(D))): +    if tmp >= g: +        if cnt < ans: +            ans = cnt +    else: +        for j in range(d - 1, -1, -1): -                if sum_x >= G: +                if tmp >= g: -                sum_x += 100 * (j + 1) +                tmp = tmp + 100 * (j + 1) -    if res > cnt: -        res = cnt -print(res) +        if cnt < ans: +            ans = cnt +print(ans)