human
Caisa is going to have a party and he needs to buy the ingredients for a big chocolate cake. For that he is going to the biggest supermarket in town.

Unfortunately, he has just s dollars for sugar. But that's not a reason to be sad, because there are n types of sugar in the supermarket, maybe he able to buy one. But that's not all. The supermarket has very unusual exchange politics: instead of cents the sellers give sweets to a buyer as a change. Of course, the number of given sweets always doesn't exceed 99, because each seller maximizes the number of dollars in the change (100 cents can be replaced with a dollar).

Caisa wants to buy only one type of sugar, also he wants to maximize the number of sweets in the change. What is the maximum number of sweets he can get? Note, that Caisa doesn't want to minimize the cost of the sugar, he only wants to get maximum number of sweets as change. 

Input

The first line contains two space-separated integers n, s (1 ≤ n, s ≤ 100).

The i-th of the next n lines contains two integers xi, yi (1 ≤ xi ≤ 100.
0 ≤ yi < 100), where xi represents the number of dollars and yi the number of cents needed in order to buy the i-th type of sugar.

Output

Print a single integer representing the maximum number of sweets he can buy, or -1 if he can't buy any type of sugar.

Examples

Input

5 10
3 90
12 0
9 70
5 50
7 0

Output

50

Input

5 5
10 10
20 20
30 30
40 40
50 50

Output

-1

Note

In the first test sample Caisa can buy the fourth type of sugar, in such a case he will take 50 sweets as a change.
Solve the task in PYTHON.
assistant
#Here is Python program to print a single integer representing the maximum number of sweets he can buy, or -1 if he can't buy any type of sugar.

def main():
    N, S = read()
    sweets = (read() for _ in xrange(N))

    best = 101
    for i in sweets:
        if i[0] < S:
            if 0 < i[1] < best or best > 100:
                best = i[1] if i[1] != 0 else 100
        elif i[0] <= S and i[1] == 0:
            if best > 100:
                best = 100

    return 100 - best
            

### UTILITY FUNCTIONS, END OF CODE ###

import sys

class has_constants(object):
    def __init__(self, *args):
        self.constants = args

    def __call__(self, f):
        for c in self.constants:
            exec('f.{0} = list()'.format(c))
        return f

def debug_print(obj, s='VAR'):
    print '[DEBUG] Value of variable "{0}": {1}'.format(s, obj)

### Credit to chaotic_iak for these next two functions, modified by fz0718 ###
@has_constants('str', 'str_list', 'int_list')
def read(mode=None):
    if mode is None: mode = read.int_list
    inputs = raw_input().strip()
    if mode is read.str: return inputs
    if mode is read.str_list: return inputs.split()
    if mode is read.int_list: return list(map(int, inputs.split()))

def write(s='\n'):
    if s is None: s = ''
    if hasattr(s, '__iter__'): s = ' '.join(str(x) for x in s)
    s = str(s)
    sys.stdout.write(s)

### Running main function ###
if __name__ == '__main__':
    write(main())