AIRLINE problem

My issue

what is the difference between condition in line 18 and line 19 (commented)?
What are the test cases where line 18 fails??

My code

import java.util.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner la=new Scanner(System.in);
		int t=la.nextInt();
		while(t-->0){
		    int a=la.nextInt();
		    int b=la.nextInt();
		    int c=la.nextInt();
		    int d=la.nextInt();
		    int e=la.nextInt();
		    int minw=Math.min(a,Math.min(b,c));
		    if((a+b+c-minw)<=d && minw<=e) System.out.println("YES");
//((a+b)<=d && c<=e) ||((a+c)<=d &&b<=e) ||((b+c)<=d &&a<=e)
		    else System.out.println("NO");
		}
	}
}

Problem Link: AIRLINE Problem - CodeChef

@pranjulmalpani
for a=5,b=6,c=7,d=12,e=6.
its will be yes but when 18 line goes it will print no.

Thanks Bro!!!