// Arup Guha
// Started a long time ago.
// Finished: 1/8/2015
// Solution to 2010 World Finals Problem G: The Islands

import java.util.*;

public class g {

	// Stores case number.
	public static int loop;

	// Stores input data for a case.
	public static int n;
	public static point[] islands;
	public static int setA;
	public static int setB;

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);

		n = stdin.nextInt();
		setA = stdin.nextInt();
		setB = stdin.nextInt();
		loop = 1;

		// Go through each case.
		while (n != 0) {

			islands = new point[n];
			for (int i=0; i<n; i++) {
				int x = stdin.nextInt();
				int y = stdin.nextInt();
				islands[i] = new point(x,y);
			}

			solve();

			// Read in next data set.
			n = stdin.nextInt();
			setA = stdin.nextInt();
			setB = stdin.nextInt();
			loop++;
		}
	}

	public static void solve() {

		// Will store best distances and previous island in each case.
		double[][] dp = new double[n][n];
		int[][] last = new int[n][n];
		for (int i=0; i<n; i++)
			Arrays.fill(dp[i], 10000000);
		dp[0][0] = 0;
		int lastA = 0, lastB = 0;

		// Loop through each state.
		for (int i=0; i<n; i++) {
			for (int j=0; j<n; j++) {

				// Invalid states since only one trip visits these islands.
				if (i == j && i < n-1) continue;
				if (j == setA) continue;
				if (i == setB) continue;

				// We are moving from i-1 to i for setA.
				if (i > j+1) {
					dp[i][j] = dp[i-1][j] + islands[i-1].dist(islands[i]);
					last[i][j] = i-1;
				}

				// We must move from a previous spot to i for set A.
				else if (i == j+1) {

					// Initialize best.
					double min = dp[0][j] + islands[0].dist(islands[i]);
					last[i][j] = 0;

					// Try each possible island as the last island before i on this path.
					for (int k=1; k<j; k++) {
						if (dp[k][j] + islands[k].dist(islands[i]) < min) {
							min = dp[k][j] + islands[k].dist(islands[i]);
							last[i][j] = k;
						}
					}

					dp[i][j] = min;
				}

				// Lastest is setB, building off previous setB
				else if (j > i+1) {
					dp[i][j] = dp[i][j-1] + islands[j-1].dist(islands[j]);
					last[i][j] = j-1;
				}

				// We must move from previous spot for setB to j.
				else if (j == i+1) {

					double min = dp[i][0] + islands[0].dist(islands[j]);
					last[i][j] = 0;

					// Try each possible island as the last island before j on this path.
					for (int k=1; k<i; k++) {
						if (dp[i][k] + islands[k].dist(islands[j]) < min) {
							min = dp[i][k] + islands[k].dist(islands[j]);
							last[i][j] = k;
						}
					}

					dp[i][j] = min;
				}

				// Important last case - need to build off both series, and store two lasts, not one.
				else if (i == n-1 && j == n-1) {

					double min = 10000000;

					// Try each previous island for Set B.
					for (int k=setB; k<n-2; k++) {
						double cur = dp[n-2][k] + islands[n-2].dist(islands[n-1]) + islands[k].dist(islands[n-1]);
						if (cur < min) {
							min = cur;
							lastA = n-2;
							lastB = k;
						}
					}

					// Same for setA.
					for (int k=setA; k<n-2; k++) {
						double cur = dp[k][n-2] + islands[n-2].dist(islands[n-1]) + islands[k].dist(islands[n-1]);
						if (cur < min) {
							min = cur;
							lastA = k;
							lastB = n-2;
						}
					}

					dp[i][j] = min;
				}
			} //end j
		} // end i;

		// Distance is in DP array.
		System.out.printf("Case %d: %.2f\n", loop, dp[n-1][n-1]+1e-9);

		// Reconstruct paths.
		ArrayList<Integer> pathA = new ArrayList<Integer>();
		ArrayList<Integer> pathB = new ArrayList<Integer>();
		pathA.add(n-1);
		pathA.add(lastA);
		pathB.add(lastB);

		// Build the path - you know exactly how many nodes it'll be so just do a for loop.
		int cur = Math.max(lastA, lastB);
		for (int i=0; i<n-2; i++) {
			cur = last[lastA][lastB];

			if (lastA > lastB) {
				pathA.add(cur);
				lastA = cur;
			}
			else {
				pathB.add(cur);
				lastB = cur;
			}
		}

		// Reverse A to get correct order, then add all of B to it.
		Collections.reverse(pathA);
		for (int i=0; i<pathB.size(); i++)
			pathA.add(pathB.get(i));

		// Stupid rule that 0 1 must print first...
		if (!pathA.get(1).equals(new Integer(1)))
			Collections.reverse(pathA);

		// Print out.
		for (int i=0; i<pathA.size()-1; i++)
			System.out.print(pathA.get(i)+" ");
		System.out.println(pathA.get(pathA.size()-1));
	}
}

class point {

	public int x;
	public int y;

	public point(int myx, int myy) {
		x = myx;
		y = myy;
	}

	public double dist(point other) {
		return Math.sqrt( (x-other.x)*(x-other.x) + (y-other.y)*(y-other.y));
	}
}