Let ABC be a triangle with\angle BAC = 90. A circle is tangent to the sides AB and AC at X and Y respectively, such that the points on the circle diametrically opposite X and Y both lie on the side BC. Given that AB = 6, find the perimeter of the portion of the circle that lies outside the triangle.