import java.util.*;
public class PrintFactor{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
System.out.println("Enter the first number");
int a = sc.nextInt();
System.out.println("Enter the Second number");
int b = sc.nextInt();
System.out.println("No divisible by "+a);
for(int i=1; i<=100; i++){
if (i%a == 0){
System.out.print(i+",");
}
}
System.out.println();
System.out.println("No divisible by "+b);
for(int i=1; i<=100; i++){
if (i%b == 0){
System.out.print(i+",");
}
}
System.out.println();
System.out.println("No divisible by "+a +","+b);
for(int i=1; i<=100; i++){
if (i%a == 0 && i%b ==0){
System.out.print(i+",");
}
}
}
}