Help me in solving DONDRIVE problem

My issue

My code

# cook your dish here
TC = int(input())
for i in range(TC):
    N = int(input())
    X = int(input())
    sub = N-X
    print(sub)

Problem Link: DONDRIVE Problem - CodeChef

T=int(input())
for i in range(T):
N,X = map(int,input().split(’ '))
print(N-X)

Traceback (most recent call last):
File “./prog.py”, line 5, in
ValueError: invalid literal for int() with base 10: ‘5 2’
this code also give error .