Wrong answerb

Describe your bug

answer and it was running but the submit it was showing wrong answer

import java.util.*;

class Codechef
{
public static void main (String[] args)
{
Scanner read = new Scanner(System.in);
int t = read.nextInt();
for(int i=0; i<t; i++)
{
int n = read.nextInt();
int[] a = new int[n];
int[] b = new int[n];
for(int j=0; j<n; j++){
a[j] = read.nextInt();
}
for(int j=0; j<n; j++){
b[j] = read.nextInt();
}
boolean isValid = true;
for(int j=0; j<n; j++){
for(int k=0; k<n; k++){
if(a[j] == b[k]){
isValid = false;
break;
}
}
}
if(isValid){
System.out.println(“Yes”);
}
else{
System.out.println(“No”);
}
}
}
}

Screenshot

Additional info