import java.util.Scanner;
public class test4 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int runtime = sc.nextInt();
for(int i = 1 ; i <= runtime ; i++ ) {
int H1 = sc.nextInt();
int M1 = sc.nextInt();
int H2 = sc.nextInt();
int M2 = sc.nextInt();
int deadline= sc.nextInt();
if(Math.abs((H2*60+M2)-(H1*60+M1))>deadline) {
System.out.println("Yes");
}else {
System.out.println("No");
}
}
}
}
}
請問各位大大哪出了問題