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

pc = []

for i in range(D):

    p,c = list(map(int,input().split()))

    pc.append([i+1,p,c])

pc.sort(reverse = True)

ansc = []

for i in range(2**D):

    count = 0

    sumb = 0

    pc2 = []

    for j in range(D):

        if (i >> j) & 1 == 1:

            sumb += 100*pc[j][0]*pc[j][1] + pc[j][2]

            count += pc[j][1]

        else:

            pc2.append(pc[j])

    pc2 = sorted(pc2,reverse = True)

    c2 = 0

    while sumb < G:

        sumb += 100*pc2[0][0]

        count += 1

        c2 += 1

        if c2 == pc2[0][1]:

            count = 10**9

            break

    ansc.append(count)

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

pc = []

for i in range(D):

    p,c = list(map(int,input().split()))

    pc.append([i+1,p,c])

pc.sort(reverse = True)

ansc = []

for i in range(2**D):

    count = 0

    sumb = 0

    pc2 = []

    for j in range(D):

        if (i >> j) & 1 == 1:

            sumb += 100*pc[j][0]*pc[j][1] + pc[j][2]

            count += pc[j][1]

        else:

            pc2.append(pc[j])

    pc2 = sorted(pc2,reverse = True)

    c2 = 0

    if sumb < G:

        c2 = (G - sumb)//(100*pc2[0][0])

        if (G - sumb)%(100*pc2[0][0]) != 0:

            c2 += 1

        if c2 >= pc2[0][1]:

            count = 10**9

        else:

            count += c2

    ansc.append(count)

print((min(ansc)))
D, G = list(map(int, input().split()))
pc = []
for i in range(D):
    p, c = list(map(int, input().split()))
    pc.append([i + 1, p, c])
pc.sort(reverse=True)
ansc = []
for i in range(2**D):
    count = 0
    sumb = 0
    pc2 = []
    for j in range(D):
        if (i >> j) & 1 == 1:
            sumb += 100 * pc[j][0] * pc[j][1] + pc[j][2]
            count += pc[j][1]
        else:
            pc2.append(pc[j])
    pc2 = sorted(pc2, reverse=True)
    c2 = 0
    while sumb < G:
        sumb += 100 * pc2[0][0]
        count += 1
        c2 += 1
        if c2 == pc2[0][1]:
            count = 10**9
            break
    ansc.append(count)
print((min(ansc)))

D, G = list(map(int, input().split()))
pc = []
for i in range(D):
    p, c = list(map(int, input().split()))
    pc.append([i + 1, p, c])
pc.sort(reverse=True)
ansc = []
for i in range(2**D):
    count = 0
    sumb = 0
    pc2 = []
    for j in range(D):
        if (i >> j) & 1 == 1:
            sumb += 100 * pc[j][0] * pc[j][1] + pc[j][2]
            count += pc[j][1]
        else:
            pc2.append(pc[j])
    pc2 = sorted(pc2, reverse=True)
    c2 = 0
    if sumb < G:
        c2 = (G - sumb) // (100 * pc2[0][0])
        if (G - sumb) % (100 * pc2[0][0]) != 0:
            c2 += 1
        if c2 >= pc2[0][1]:
            count = 10**9
        else:
            count += c2
    ansc.append(count)
print((min(ansc)))

-    while sumb < G: -        sumb += 100 * pc2[0][0] -        count += 1 -        c2 += 1 -        if c2 == pc2[0][1]: +    if sumb < G: +        c2 = (G - sumb) // (100 * pc2[0][0]) +        if (G - sumb) % (100 * pc2[0][0]) != 0: +            c2 += 1 +        if c2 >= pc2[0][1]: -            break +        else: +            count += c2