for _ in range(int(input())): a, b, c, d = map(int, input().split()); assert -100 <= min(a, b, c, d) and max(a, b, c, d) <= 100 def f(x0, x1): return a*(x1*x1*x1-x0*x0*x0) + b*(x1*x1-x0*x0) + c*(x1-x0) < 0 print("Yes" if a and f(-b/3/a, -b/3/a+0.001) else "No")