From the middle of a square, a small square is cut off. The area of the resulting figure is 65 square centimetres and the sum of the lengths of all its edges is 52 centimetres. What is the length of a side of the original square and the square cut off?