Help me in solving NFS problem

My issue

where did i go wrong

My code

for i in range(int(input())):
    a = list(map(int, input().split()))
    
    u = a[0]
    v = a[1]
    ac = a[2]
    s = a[3]
    
    vog = (u**2 + 2*(-ac)*s)**0.5  
    if u == v or vog <= v:
        print("Yes")
    else:
        print("No")

Learning course: Jump from 2* to 3*
Problem Link: Turn It Practice Problem in Jump from 2* to 3* - CodeChef

You can not use kinematics like that. Based on distance, there’s a chance that you get negative acceleration. So, by using square root, you are likely trying to compare a complex number to a real.

Don’t use square root.