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

pc = [list(map(int, input().split())) for _ in range(d)]

ans = 1001

for i in range(1<<d):

    count, score, left = 0, 0, 0

    for j in range(d):

        if (i >> j) & 1:

            score += (j+1)*100*pc[j][0] + pc[j][1]

            count += pc[j][0]

        else: left = j

    for j in range(pc[left][0]):

        if score >= g: break

        score += (left+1)*100

        count += 1

    if score >= g: ans = min(ans, count)

print(ans)

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

pc = [list(map(int, input().split())) for _ in range(d)]

ans = 1001

for i in range(1<<d):

    count, score, left = 0, 0, 0

    for j in range(d):

        if (i >> j) & 1:

            score += (j+1)*100*pc[j][0] + pc[j][1]

            count += pc[j][0]

        else: left = j

    add = min(-(-max(g-score, 0)//((left+1)*100)),pc[left][0])

    count += add

    score += (left+1)*100*add

    if score >= g: ans = min(ans, count)

print(ans)
d, g = list(map(int, input().split()))
pc = [list(map(int, input().split())) for _ in range(d)]
ans = 1001
for i in range(1 << d):
    count, score, left = 0, 0, 0
    for j in range(d):
        if (i >> j) & 1:
            score += (j + 1) * 100 * pc[j][0] + pc[j][1]
            count += pc[j][0]
        else:
            left = j
    for j in range(pc[left][0]):
        if score >= g:
            break
        score += (left + 1) * 100
        count += 1
    if score >= g:
        ans = min(ans, count)
print(ans)

d, g = list(map(int, input().split()))
pc = [list(map(int, input().split())) for _ in range(d)]
ans = 1001
for i in range(1 << d):
    count, score, left = 0, 0, 0
    for j in range(d):
        if (i >> j) & 1:
            score += (j + 1) * 100 * pc[j][0] + pc[j][1]
            count += pc[j][0]
        else:
            left = j
    add = min(-(-max(g - score, 0) // ((left + 1) * 100)), pc[left][0])
    count += add
    score += (left + 1) * 100 * add
    if score >= g:
        ans = min(ans, count)
print(ans)

-    for j in range(pc[left][0]): -        if score >= g: -            break -        score += (left + 1) * 100 -        count += 1 +    add = min(-(-max(g - score, 0) // ((left + 1) * 100)), pc[left][0]) +    count += add +    score += (left + 1) * 100 * add