For a given number n, find whether it is a factorial number or not. A Factorial number is a number which is equal to factorial value of another numbers. For example 6 is factorial number because it is factorial of 3 and 5 is not a factorial number.
First line contains an integer, the number of test cases 'T' Each test case should contain a positive integer N.
Print "1" if it is a factorial number else print "0".
1 <= N <=100000
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.