Help me in solving BM02 problem

My issue if i change the inputs then also its showing results(inputs are 14,3) and why in the solution they have not put conditon i.e if A>=B and A%B==0:

My code

# Update the '_' below to solve the problem

t = int(input())
for i in range(t):
    #Accept 2 integers as inputs. Note that A >= B and A is divisble by B.
    A, B = map(int,input().split())
    
    #Difference of inputs
    D = A-B               
    #Division of inputs
    Q = A // B               
    #Print the desired output for each test case
    print(D ,Q)
    

Learning course: Python for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone