The above won't work if the integers are large enough to cause an overflow.