Help me in solving LB01B problem

My issue

HOW THIS WILL SOLVE

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

@shivamkamath
if both A and B are even then print (A+B)/2;
If both A and B are odd then print (A+B)/2;
else case -1;

it’s quite easy actually. if there is a proper integer average then the answer will be that average else -1