// Arup Guha
// 1/24/2018
// Solution to 2012 NAQ Problem: Texas Summers

import java.util.*;

public class texassummers {

	public static int n;
	public static int[][] pts;
	public static long[][] adj;

	public static void main(String[] args) {

		// Read in the # of vertices (add in start and end).
		Scanner stdin = new Scanner(System.in);
		n = stdin.nextInt()+2;

		// Read in the pts.
		pts = new int[n][2];
		for (int i=0; i<n; i++)
			for (int j=0; j<2; j++)
				pts[i][j] = stdin.nextInt();

		// Create the adjacency matrix.
		adj = new long[n][n];
		for (int i=0; i<n; i++) {
			for (int j=i+1; j<n; j++) {
				adj[i][j] = distsq(pts[i], pts[j]);
				adj[j][i] = adj[i][j];
			}
		}

		// Set up distance and used array for Dijkstra's
		long[] d = new long[n];
		Arrays.fill(d, Long.MAX_VALUE);
		d[n-2] = 0;
		boolean[] best = new boolean[n];

		// Set up build back array for Dijkstra's.
		int[] prev = new int[n];
		Arrays.fill(prev, -1);
		prev[n-2] = n-2;

		// Fixed number of iterations for Dijkstra's.
		for (int i=0; i<n-1; i++) {

			int next = -1;

			// Find next smallest estimate.
			for (int j=0; j<n; j++) {
				if (best[j]) continue;
				if (next == -1 || d[j] < d[next])
					next = j;
			}

			// This distance is optimal.
			best[next] = true;

			// Update each estimate that improves via next.
			for (int j=0; j<n; j++) {
				if (d[next] + adj[next][j]  < d[j]) {
					d[j] = d[next] + adj[next][j];
					prev[j] = next;
				}
			}
		}

		// Will store path, build backwards.
		ArrayList<Integer> path = new ArrayList<Integer>();
		int cur = n-1;

		// n-2 is where we started, stop before we add it.
		while (prev[cur] != n-2) {
			path.add(prev[cur]);
			cur = prev[cur];
		}

		// Because we built it backwards, flip it.
		Collections.reverse(path);

		// Go straight, no shade!
		if (path.size() == 0)
			System.out.println("-");

		// Print out the shade spots we visit.
		else {
			for (int i=0; i<path.size(); i++)
				System.out.println(path.get(i));
		}



	}

	public static long distsq(int[] pt1, int[] pt2) {
		return (pt1[0]-pt2[0])*(pt1[0]-pt2[0]) + (pt1[1]-pt2[1])*(pt1[1]-pt2[1]);
	}
}