For this Question: Given a number N, your task is to find if it is a perfect square or not.The first line of input contains the number of test cases T, the next T lines contains a single integer N.

<b>Constraints:</b>
1 < = T < = 1000
1 < = N < = 10<sup>12</sup>For each test case, print "YES" if the number N is a perfect square else print "NO".Sample Input:-
2
625
624

Sample Output:-
YES
NO, I have written this Solution Code: /* package codechef; // 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 Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while(t-->0){
		    long n = sc.nextLong();
		    if(check(n)==1){
		        System.out.println("YES");
		    }
		    else{
		        System.out.println("NO");
		    }
		}
	}
	static int check(long n){
	    long l=1;
	    long h = 10000000;
	    long m=0;
	    long p=0;
	    long ans=0;
	    while(l<=h){
	        m=l+h;
	        m/=2;
	        p=m*m;
	        if(p > n){
	            h=m-1;
	        }
	        else{
	            l=m+1;
	            ans=m;
	            
	        }
	    
	        //System.out.println(l+" "+h);
	    }
	    if(ans*ans==n){return 1;}
	    return 0;
	}
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?