human
PYTHON3 solution for "You are given four integer values a, b, c and m.

Check if there exists a string that contains: 

  * a letters 'A'.

  * b letters 'B'.

  * c letters 'C'.

  * no other letters.

  * exactly m pairs of adjacent equal letters (exactly m such positions i that the i-th letter is equal to the (i+1)-th one). 

Input

The first line contains a single integer t (1 ≤ t ≤ 10^4) — the number of testcases.

Each of the next t lines contains the description of the testcase — four integers a, b, c and m (1 ≤ a, b, c ≤ 10^8.
0 ≤ m ≤ 10^8).

Output

For each testcase print "YES" if there exists a string that satisfies all the requirements. Print "NO" if there are no such strings.

You may print every letter in any case you want (so, for example, the strings yEs, yes, Yes and YES will all be recognized as positive answer).

Example

Input

3
2 2 1 0
1 1 1 1
1 2 3 2

Output

YES
NO
YES

Note

In the first testcase strings "ABCAB" or "BCABA" satisfy the requirements. There exist other possible strings.

In the second testcase there's no way to put adjacent equal letters if there's no letter that appears at least twice.

In the third testcase string "CABBCC" satisfies the requirements. There exist other possible strings.":



=====
Can you provide a Python program to print "NO" if there are no such strings?
assistant
#Here is Python program to print "NO" if there are no such strings.
 T = int(input())

def solve():
    a, b, c, m = map(int, input().split())

##    def dfs(a, b, c, m, s):
##        ans = False
##        if a == 0 and a == b and a == c:
##            for i in range(len(s)-1):
##                if s[i] == s[i+1]:
##                    m -= 1
##            if m == 0:
##                return True
##        if a != 0:
##            if dfs(a-1, b, c, m, s+"A"):
##                ans = True
##        if ans:
##            return True
##        if b != 0:
##            if dfs(a, b-1, c, m, s+"B"):
##                ans = True
##        if ans:
##            return True
##        if c != 0:
##            if dfs(a, b, c-1, m, s+"C"):
##                ans = True
##        return ans
##
##    set_n = set()
##    for a in range(8):
##        for b in range(8):
##            for c in range(8):
##                arr = [0]*13
##                t = tuple(sorted([a, b, c]))
##                if t not in set_n:
##                    set_n.add(t)
##                    for m in range(13):
##                        if dfs(a, b, c, m, ""):
##                            arr[m] = 1
##                    print(a, b, c)
##                    print(''.join([str(x) for x in arr]))

    a, b, c = sorted([a, b, c])
    if c == 0:
        print("YES" if m == 0 else "NO")
        return
    if b == 0:
        print("YES" if m == c-1 else "NO")
        return    
    v = a+b+c-3
    s = max(c-a-b, 0)
    if s >= 2:
        print("YES" if s-1 <= m <= v else "NO")
    else:
        print("YES" if m <= v else "NO") 
    
for _ in range(T):
    solve()