clean solution to greatest divide the num using 2, 3, and 5.

```
public class Solution {
public static boolean isUgly(int num) {
if (num <= 0) {
return false;
}
int[] divisors = {2, 3, 5};
for(int d : divisors) {
while (num % d == 0) {
num /= d;
}
}
return num == 1;
}
}
```