codechef always say wrong answer, but my output is correct for the problem of beautiful arrays ICPC16B

import java.util.Scanner;
public class Main{

public static void main(String[] args)
{

int count=0;
Scanner input=new Scanner(System.in);

  int t;
   t=input.nextInt();
 String boy[]=new String[t];

for(int m=0;m<t;m++)
{

   int n;
  n=input.nextInt();
  double a[]=new double[n];

     for(int i=0;i<n;i++)
     {
        a[i]=input.nextInt();
     }

count=0;

  for(int i=0;i<n-1;i++)
     {
       for(int j=i;j<n-1;j++)
         {
       
        if(a[i]==a[i]*a[j+1]||a[j+1]==a[i]*a[j+1])
               {
          count++;
                  }
           }

      }
 if(count==(n*(n-1))/2)
    {
      boy[m]="yes";
     }
  else
    {
      boy[m]="no";
   }

}
for(int i=0;i<t;i++)
{
System.out.println(boy[i]);
}
}}

double a[]=new double[n];

Why double? I hope you know that “==” doesnt exactly work like int in case of double. Due to how double numbers are stored, it may not give correct result.