What is wrong in my code for this program RECTANGL

Please help me which test case is causing wrong answer for the below program

import java.io.*;

import java.util.*;

class RECTANGL

{

public static void main(String args[])throws IOException

{

	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int test=Integer.parseInt(br.readLine());
	while(test>0)
	{
		test--;
		StringTokenizer str=new StringTokenizer(br.readLine()," ");
		ArrayList<Integer> a=new ArrayList<>();
		int i=0;
		for(i=0;i<4;i++)
		{
			a.add(Integer.parseInt(str.nextToken()));
			
		}
		Collections.sort(a);
		if(a.get(0)==a.get(1) && a.get(2)==a.get(3))
		{
			System.out.println("YES");
		}
		else
		{
			System.out.println("NO");
		}
	}
}

}