'''

bool isUgly(int n) {

if (n<0) return false;

while (n % 15 == 0)

n /= 15;

while (n % 10 == 0)

n /= 10;

while (n % 6 == 0)

n /= 6;

if ((n&(n - 1)) == 0 || 1162261467 % n == 0 || 1220703125 % n == 0)

return true;

else return false;

}

'''