d, g = [int(i) for i in input().split()]



score = 0

p = []

c = []

for i in range(d):

    p_tmp, c_tmp = [int(i) for i in input().split()]

    p.append(p_tmp)

    c.append(c_tmp)



num = []

for i in range(2**d):

    num_tmp = 0

    score = 0

    not_comp = []

    for j in range(d):

        if i >> j & 1:

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

            num_tmp += p[j]

        else:

            not_comp.append(j)



    for j in not_comp[::-1]:

        for k in range(p[j]-1):

            if score < g:

                score += 100 * (j+1)

                num_tmp += 1

            else:

                break

        else:

            continue

        break

    if score >= g:

        num.append(num_tmp)



ans = min(num)

print(ans)

d, g = [int(i) for i in input().split()]



score = 0

p = []

c = []

for i in range(d):

    p_tmp, c_tmp = [int(i) for i in input().split()]

    p.append(p_tmp)

    c.append(c_tmp)



num = []

for i in range(2**d):

    num_tmp = 0

    score = 0

    not_comp = []

    for j in range(d):

        if i >> j & 1:

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

            num_tmp += p[j]

        else:

            not_comp.append(j)



    for j in not_comp[::-1]:

        if score < g:

            num_j = min(p[j]-1, (g-score-1)//(100*(j+1))+1)

            score += num_j * 100*(j+1)

            num_tmp += num_j

    if score >= g:

        num.append(num_tmp)



ans = min(num)

print(ans)

d, g = [int(i) for i in input().split()]
score = 0
p = []
c = []
for i in range(d):
    p_tmp, c_tmp = [int(i) for i in input().split()]
    p.append(p_tmp)
    c.append(c_tmp)
num = []
for i in range(2**d):
    num_tmp = 0
    score = 0
    not_comp = []
    for j in range(d):
        if i >> j & 1:
            score += p[j] * 100 * (j + 1) + c[j]
            num_tmp += p[j]
        else:
            not_comp.append(j)
    for j in not_comp[::-1]:
        for k in range(p[j] - 1):
            if score < g:
                score += 100 * (j + 1)
                num_tmp += 1
            else:
                break
        else:
            continue
        break
    if score >= g:
        num.append(num_tmp)
ans = min(num)
print(ans)

d, g = [int(i) for i in input().split()]
score = 0
p = []
c = []
for i in range(d):
    p_tmp, c_tmp = [int(i) for i in input().split()]
    p.append(p_tmp)
    c.append(c_tmp)
num = []
for i in range(2**d):
    num_tmp = 0
    score = 0
    not_comp = []
    for j in range(d):
        if i >> j & 1:
            score += p[j] * 100 * (j + 1) + c[j]
            num_tmp += p[j]
        else:
            not_comp.append(j)
    for j in not_comp[::-1]:
        if score < g:
            num_j = min(p[j] - 1, (g - score - 1) // (100 * (j + 1)) + 1)
            score += num_j * 100 * (j + 1)
            num_tmp += num_j
    if score >= g:
        num.append(num_tmp)
ans = min(num)
print(ans)

-        for k in range(p[j] - 1): -            if score < g: -                score += 100 * (j + 1) -                num_tmp += 1 -            else: -                break -        else: -            continue -        break +        if score < g: +            num_j = min(p[j] - 1, (g - score - 1) // (100 * (j + 1)) + 1) +            score += num_j * 100 * (j + 1) +            num_tmp += num_j