There are two packs of candies with the same amount, and they are divided among the children in the two classes of the kindergarten. The children in Class A are given the same amount of candy, and there is one piece left after the distribution. The children in Class B are also given the same amount of candy. After dividing, there is one piece left. It is known that there are 8 people in class A and 6 people in class B, so how many pieces are there at least in each of these two bags of candy?
有两包数量相同的糖果，分别分给幼儿园两个班的小朋友，甲班的小朋友每人分的糖一样多，分完后剩下一块，乙班的小朋友每人分的糖也一样多，分完后也剩下一块，已知甲班有8人，乙班有6人，那么这两包糖每包最少有多少块．
<gadget id="calculator">24 + 1</gadget>
<output>25</output>

<result>25</result>