/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import static org.junit.Assert.*;


/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
    public static void main (String[] args) throws java.lang.Exception {
        for (int a = 0; a <= 1000; a++)
            for (int b = 0; b <= 1000; b++){
                int expected = a * b;
                int actual = (int)multiply(a, b);
                if (expected != actual) {
                    System.out.format("Multiply Fail of %d x %d. Expected %d but got %d %n",
                        a, b, expected, actual);
                }
            }
    }            

static double multiply(double a, double b) {
    return 0 == (int)b 
       ? 0.0 
       : a / (1 / b);
}	
}