Help me in solving GDTURN problem

My issue

I am running the code but is showing error in second line, but when I am running the same code in python it is working.whats the problem here?

My code

chef=int(input("enter digit"))
chefina=int(input("enter digit 1"))
sum=(chef+chefina)
print(sum)
if sum>6:
         print("yes")
else:
    print("no")
    
    

Problem Link: GDTURN Problem - CodeChef

Hey uniyalansh05 :wave: , Welcome to CodeChef

The problem that you are solving includes a section named “Input Format
If you read that properly you can understand what’s wrong with your code.

I specifies that the first line contains an integer t, which depicts the number of test cases, and the following t lines contain two integers.

You need to modify your code as follows:

t = int(input())
for i in range(t):
       input_str = input().split()  # This makes the input_str a list which contains two elements, X and Y
       chef = int(input_str[0]) # The first integer is for chef
       chefina = int(input_str[1]) # The Second integer is for chefina

       # Add the rest of the logic inside the for loop.

If you want to simplify, the process of taking input, you can also use the following code.

for _ in range(int(input)):
       chef, chefina = map(int, input().split())
       # Rest of your code