Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* package whatever; // don't place package name! */
- import java.util.*;
- import java.lang.*;
- import java.io.*;
- /* Name of the class has to be "Main" only if the class is public. */
- class Rectangle
- {
- public static void main (String[] args) throws java.lang.Exception
- {
- Scanner sc=new Scanner(System.in);
- int t=sc.nextInt();
- for(int i=0;i<t;i++)
- {
- Integer a[]=new Integer[4];
- int l=0,b=0;
- int c1=0,c2=0;
- for(int j=0;j<4;j++)
- {
- a[j]=sc.nextInt();
- l=a[0];
- if(l==a[j])
- {
- c1++;
- }
- else
- {
- b=a[j];
- c2++;
- }
- }
- // System.out.println(c1);
- // System.out.println(c2);
- if(c1==c2)
- System.out.println("YES");
- else
- System.out.println("NO");
- }
- // your code goes here
- }
- }
Add Comment
Please, Sign In to add comment