If 1 group digs 18 more than 2 groups, we can get (x+1) * (y+1)-xy =18.
If two groups are dug less than three groups, we can get (X-2)*(Y+2)-XY=2.
X = 10 and y = 7 can be obtained from the above two formulas.
So two groups of *** 10 people, each dug an average of 7 pits, ***70 pits.