import java.util.*;
public class Main
{
public static void main(String[] args)
{
int num1, num2;
do
{
System.out.print("First number? ");
num1 = Integer.parseInt(new Scanner(System.in).nextLine());
if (num1 != 0)
{
System.out.print("Second number? ");
num2 = Integer.parseInt(new Scanner(System.in).nextLine());
if (num2 == 0)
{
System.out.println("Cannot divide by 0");
System.out.println();
}
else
{
System.out.printf("Division is %1$s" + "\r\n", num1 / num2);
System.out.printf("Remainder is %1$s" + "\r\n", num1 % num2);
System.out.println();
}
}
} while (num1 != 0);
System.out.println("Bye!");
}
}