A box with no top that has a volume of 1000 cubic inches is to be constructed from a 22 x 30-inch sheet of cardboard by cutting squares of equal size from each corner and folding up the flaps. If one of the dimensions has to be greater than 18 inches, what size square should be cut from each corner?