import java.util.Scanner;
class DivideByZero{
    	public static void main(String args[]){   
       		int a,b,c;
       		Scanner obj = new Scanner ( System.in );

       		System.out.println ("Enter the value for a");
        	a = obj.nextInt();  	//numerator

        	System.out.println ("Enter the value for b");
       		b = obj.nextInt();	//denominator	

        	try{ 	
           		
			c = a / b;
           		System.out.println ("Quotient is = "+c);
       		
		}catch(ArithmeticException ae){
            		
			System.out.println("ArithmeticException occured! "+ae);
        	}
    	}
}

