Cutting a rectangle