import java.util.*;
import java.lang.*;

class Ideone{
	public static int mult(int a, int b) throws ArithmeticException {
    long resultado = a * (long) b;    
    if (resultado > Integer.MAX_VALUE || resultado < Integer.MIN_VALUE){
        throw new ArithmeticException("Integer overflow");
    }
    return (int) resultado;
    }
    
	public static void main (String[] args) throws java.lang.Exception{
		int valor1 = 100;
		int valor2 = 22118400;
		int valor3 = 44954676;
		
		int mul = mult(valor1, valor2);
		int divisao = mul / valor3;
        System.out.printf("A soma entre %d e %d resulta %d\n", valor1, valor2, mul);
		System.out.printf("A divisão entre %d e %d resulta %d", mul, valor3, divisao);
	}
}