// Arup Guha
// 10/18/2013
// Solution to 2008 MCPC Problem B: Lampyridae Teleportae

import java.util.*;

public class b {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		double range = stdin.nextDouble();
		double x = stdin.nextDouble();
		double y = stdin.nextDouble();
		int loop = 1;

		// Go through all cases.
		while (range != 0) {

			// Fly start.
			int flyx = stdin.nextInt();
			int flyy = stdin.nextInt();
			boolean print = false;

			// Go through all fly positions.
			while (flyx != -1) {

				// We only bother if we haven't printed.
				if (!print) {

					// Move towards the fly!
					double dx = flyx - x;
					double dy = flyy - y;
					double mag = Math.sqrt(dx*dx+dy*dy);

					// This is sort of hacky...
					if (mag < range) range = mag;

					// Move in the correct direction a distance of range.
					double factor = range/mag;
					dx *= factor;
					dy *= factor;
					x += dx;
					y += dy;

					// Print if we caught it!
					if (dist(x,y,flyx,flyy)  < 1) {
						System.out.println("Firefly "+loop+" caught at ("+flyx+","+flyy+")");;
						print = true;
					}
				}

				// Get next fly position.
				flyx = stdin.nextInt();
				flyy = stdin.nextInt();
			}

			// We never caught this one.
			if (!print)
				System.out.println("Firefly "+loop+" not caught");

			// Get next case.
			range = stdin.nextDouble();
			x = stdin.nextDouble();
			y = stdin.nextDouble();
			loop++;
		}
	}

	public static double dist(double x1, double y1, double x2, double y2) {
		return Math.sqrt(Math.pow(x1-x2,2) + Math.pow(y1-y2,2));
	}
}