long division method with remainders