Comparing three numbers