Guest User

Untitled

a guest
Jan 19th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Rectangle
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. Scanner sc=new Scanner(System.in);
  13. int t=sc.nextInt();
  14. for(int i=0;i<t;i++)
  15. {
  16. Integer a[]=new Integer[4];
  17. int l=0,b=0;
  18. int c1=0,c2=0;
  19. for(int j=0;j<4;j++)
  20. {
  21. a[j]=sc.nextInt();
  22. l=a[0];
  23. if(l==a[j])
  24. {
  25. c1++;
  26. }
  27. else
  28. {
  29. b=a[j];
  30. c2++;
  31. }
  32. }
  33. // System.out.println(c1);
  34. // System.out.println(c2);
  35. if(c1==c2)
  36. System.out.println("YES");
  37. else
  38. System.out.println("NO");
  39. }
  40.  
  41.  
  42.  
  43. // your code goes here
  44. }
  45. }
Add Comment
Please, Sign In to add comment