description: 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.
solution: import static java.util.Arrays.*;
  import static java.util.Comparator.*;
  
  import java.util.*;
  
  public class B {
  
  	public Object solve () {
  		long [] L = sc.nextLong(3);
  		long M = sc.nextLong();
  
  		sort(L, reverseOrder());
  		long A = L[0], B = L[1], C = L[2];
  
  		long MAX = A + B + C - 3;
  		long MIN = A - (B + C + 1);
  
  		if (MIN <= M && M <= MAX)
  			return "YES";
  		else
  			return "NO";
  	}
  
  	private static final int CONTEST_TYPE = 2;
  
  	private static void init () {
  	}
  
  	private static Long [] boxed (long ... A) { return stream(A).mapToObj(x -> x).toArray(Long[]::new); }
  	private static long [] sort (long [] A, Comparator<Long> C) { Long [] AA = boxed(A); Arrays.sort(AA, C); return unboxed(AA, A); }
  	private static long [] unboxed (Long [] A) { return stream(A).mapToLong(x -> x).toArray(); }
  	private static long [] unboxed (Long [] A, long [] a) { System.arraycopy(unboxed(A), 0, a, 0, A.length); return a; }
  	//////////////////////////////////////////////////////////////////////////////////// OFF
  	private static IOUtils.MyScanner sc = new IOUtils.MyScanner();
  	private static class IOUtils {
  		public static class MyScanner {
  			public String next () { newLine(); return line[index++]; }
  			public int nextInt () { return Integer.parseInt(next()); }
  			public long nextLong () { return Long.parseLong(next()); }
  			public long [] nextLong (int N) {
  				long [] res = new long [N];
  				for (int i = 0; i < N; ++i)
  					res[i] = nextLong();
  				return res;
  			}
  			//////////////////////////////////////////////
  			private boolean eol () { return index == line.length; }
  			private String readLine () {
  				try {
  					int b;
  					StringBuilder res = new StringBuilder();
  					while ((b = System.in.read()) < ' ')
  						continue;
  					res.append((char)b);
  					while ((b = System.in.read()) >= ' ')
  						res.append((char)b);
  					return res.toString();
  				} catch (Exception e) {
  					throw new Error (e);
  				}
  			}
  			private MyScanner () {
  				try {
  					while (System.in.available() == 0)
  						Thread.sleep(1);
  					start();
  				} catch (Exception e) {
  					throw new Error(e);
  				}
  			}
  			private String [] line;
  			private int index;
  			private void newLine () {
  				if (line == null || eol()) {
  					line = split(readLine());
  					index = 0;
  				}
  			}
  			private String [] split (String s) { return s.length() > 0 ? s.split(" ") : new String [0]; }
  		}
  		private static String build (Object o, Object ... A) { return buildDelim(" ", o, A); }
  		private static String buildDelim (String delim, Object o, Object ... A) {
  			java.util.List<String> str = new java.util.ArrayList<>();
  			append(str, o);
  			for (Object p : A)
  				append(str, p);
  			return String.join(delim, str.toArray(new String [0]));
  		}
  		//////////////////////////////////////////////////////////////////////////////////
  		private static java.text.DecimalFormat formatter = new java.text.DecimalFormat("#.#########");
  		private static void start () { if (t == 0) t = millis(); }
  		private static void append (java.util.function.Consumer<Object> f, java.util.function.Consumer<Object> g, Object o) {
  			if (o.getClass().isArray()) {
  				int len = java.lang.reflect.Array.getLength(o);
  				for (int i = 0; i < len; ++i)
  					f.accept(java.lang.reflect.Array.get(o, i));
  			}
  			else if (o instanceof Iterable<?>)
  				((Iterable<?>)o).forEach(f::accept);
  			else
  				g.accept(o instanceof Double ? formatter.format(o) : o);
  		}
  		private static void append (java.util.List<String> str, Object o) {
  			append(x -> append(str, x), x -> str.add(x.toString()), o);
  		}
  		private static java.io.PrintWriter pw = new java.io.PrintWriter(System.out);
  		private static void flush () { pw.flush(); System.out.flush(); }
  		private static void print (Object o, Object ... A) {
  			String res = build(o, A);
  			if (DEBUG == 2)
  				err(res, '(', time(), ')');
  			if (res.length() > 0)
  				pw.println(res);
  			if (DEBUG == 1)
  				flush();
  		}
  		private static void err (Object o, Object ... A) { System.err.println(build(o, A)); }
  		private static int DEBUG;
  		private static void exit () {
  			String end = "------------------" + System.lineSeparator() + time();
  			switch(DEBUG) {
  			case 1: print(end); break;
  			case 2: err(end); break;
  			}
  			IOUtils.pw.close();
  			System.out.flush();
  			System.exit(0);
  		}
  		private static long t;
  		private static long millis () { return System.currentTimeMillis(); }
  		private static String time () { return "Time: " + (millis() - t) / 1000.0; }
  		private static void run (int N) {
  			try { DEBUG = Integer.parseInt(System.getProperties().get("DEBUG").toString()); }
  			catch (Throwable t) {}
  
  			for (int n = 1; n <= N; ++n) {
  				Object res = new B().solve();
  				if (res != null) {
  					@SuppressWarnings("all")
  					Object o = CONTEST_TYPE == 0 ? "Case #" + n + ": " + build(res) : res;
  					print(o);
  				}
  			}
  			exit();
  		}
  	}
  	////////////////////////////////////////////////////////////////////////////////////
  	public static void main (String[] args) {
  		@SuppressWarnings("all")
  		int N = CONTEST_TYPE == 1 ? 1 : sc.nextInt();
  		init();
  		IOUtils.run(N);
  	}
  }
  