while True:

    try:

        a, b = list(map(int, input().split()))

        print((a-b))

    except:

        break
for i in range(7):

    a, b = list(map(int, input().split()))

    print((a-b))
while True:
    try:
        a, b = list(map(int, input().split()))
        print((a - b))
    except:
        break

for i in range(7):
    a, b = list(map(int, input().split()))
    print((a - b))

-while True: -    try: -        a, b = list(map(int, input().split())) -        print((a - b)) -    except: -        break +for i in range(7): +    a, b = list(map(int, input().split())) +    print((a - b))