An open box is made from a rectangular piece of cardboard, with dimensions of 24 cm by 30 cm, by cutting congruent squares from each corner and folding up the sides. Determine the dimensions of the squares to be cut to create a box with a volume of 1040 cm ^3