public static boolean isPowerOfThree(int n) {

float num1 = (float)Math.log10(n);

float num2 = (num1/3);

float num3 = (float)Math.pow(10,num2 );

boolean result = false;

System.out.println(num3);

if (num3 ==(int)num3){

System.out.println("Cube");

result = true;

}

return result;

}