Balls are arranged in rows to form an equilateral triangle. The first row consists of one ball, the second row consists of two balls and so on. If 669 more balls are added, then all the balls can be arranged in the shape of a square such that each of its sides contains 8 balls less than each side of triangle had. The initial number of balls lies in the interval