Constraint issue

//package codingpractice;

import java.util.Scanner;
import java.lang.;
import java.io.
;

class Codechef {
public static void main (String[] args)
{
// your code goes here
int k=0;
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int i = 0; i<T; i++) {
int[] arr = new int[4];
for (int j = 0; j <= 3; j++) {
arr[j] = sc.nextInt();
}

            if ((arr[k] == arr[1] && arr[k+2] == arr[k+3]) || (arr[k] == arr[k+2] && arr[k+1] == arr[k+3]) || (arr[k] == arr[k+3] && arr[k+1] == arr[k+2])) {
                    System.out.println("Yes");
                } else {
                    System.out.println("No");
                }
        
        }

}

}

My code is running fine on IDE as well as codechef but I am getting wrong answer on submitting . I think it is related to some constraint issue . Please help me how to fix it .