Comparison of quantities in a word problem