Given an integer n, determine whether it is an ugly number. An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5.
n = integer
true if n is ugly, otherwise false
Example 1:
Input:
n = 6
Output:
true
Explanation:
6 = 2 × 3, so it is ugly.
Example 2:
Input:
n = 14
Output:
false
Explanation:
14 has prime factor 7, so it is not ugly.