Help me in solving LB01B problem

My issue

Solution of this question

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

The logic is quite simple with both number are odd or even then u will get a valid average and for else cases u will get -1 as answer.