Distribute 38 apples and 31 pears to several children. If each child gets the same number of pears and the same number of apples, in the end there are 2 more apples and 1 less pear, how many children are there at most?
把38个苹果和31个梨分给若干个小朋友．如果每个小朋友分得梨的个数相同，苹果个数也相同，最后苹果多2个，梨少1个，最多有多少个小朋友？
<gadget id="calculator">2 * 2</gadget>
<output>4</output>

<result>4</result>