Help me in solving LB01A problem

My issue

My code

# Step 1: Read and understand the problem statement and sample test cases

# Click on 'Next' once you are ready to proceed.
t=int(input())
for i in range(t):
    A,C=map(int,input().split())
    B=A+C/2
    if B ==0:
        print

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

@pallaviteja23
the logic is if both A and B are even or odd then print (A+B)/2 else print -1