import java.util.*;
public class PrintUglyNo{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
System.out.println("Enter the number to be checked");
int n = sc.nextInt();
check_Number(n);
}
public static void check_Number(int n){
int x = 0;
while(n>1){
if(n%5==0){
n /= 5;
} else if(n%3==0){in
n /=3;
}else if(n%2==0){
n /= 2;
} else {
System.out.println("The given no is not an ugly number");
x =1;
break;
}
}
if(x==0){
System.out.println("The given no is an ugly no.");
}
}
}