X,T = list(map(int,input().split()))

print((max(X-T,0)))
X,t = list(map(int,input().split()))

print((max(X-t,0)))
X, T = list(map(int, input().split()))
print((max(X - T, 0)))

X, t = list(map(int, input().split()))
print((max(X - t, 0)))

-X, T = list(map(int, input().split())) -print((max(X - T, 0))) +X, t = list(map(int, input().split())) +print((max(X - t, 0)))