import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class K { class Geometry { private static final double EPS = 1e-10; public long ccw(Point p0, Point p1, Point p2) { return (p1.x - p0.x) * (p2.y - p0.y) - (p1.y - p0.y) * (p2.x - p0.x); } /* * From http://en.wikipedia.org/wiki/Graham_scan does not handle * "unnecessary points" on the hull not sure how to change it so it does */ public Point[] grahamScan(final Point[] input, boolean duplicateEndPoint) { int n = input.length; int lo = 0; for (int i = 1; i < n; i++) { if (input[i].y < input[lo].y || (input[i].y == input[lo].y && input[i].x < input[lo].x)) { lo = i; } } if (lo > 0) { Point t = input[0]; input[0] = input[lo]; input[lo] = t; } Arrays.sort(input, 1, n, new Comparator() { public int compare(Point p1, Point p2) { long dx1 = p1.x - input[0].x; long dy1 = p1.y - input[0].y; long dx2 = p2.x - input[0].x; long dy2 = p2.y - input[0].y; double dist1 = Math.hypot(dx1, dy1); double dist2 = Math.hypot(dx2, dy2); double cos1 = dx1 / dist1; double cos2 = dx2 / dist2; if (Math.abs(cos1 - cos2) < EPS) { if (Math.abs(dist1 - dist2) < EPS) return 0; if (dist1 < dist2) { return -1; } return 1; } if (cos1 > cos2) return -1; return 1; } }); Point[] p = new Point[n + 1]; System.arraycopy(input, 0, p, 1, n); p[0] = new Point(p[n].x, p[n].y); int m = 2; for (int i = 3; i <= n; i++) { // to include collinear points on the hull, something should be // done // here... and probably in the sort while (true) { long ccw = ccw(p[m - 1], p[m], p[i]); if (ccw > 0) break; if (m == 2) { Point t = p[m]; p[m] = p[i]; p[i] = t; i++; } else { m--; } } m++; Point t = p[m]; p[m] = p[i]; p[i] = t; } Point[] ret = new Point[duplicateEndPoint ? m + 1 : m]; System.arraycopy(p, 1, ret, 0, m); if (duplicateEndPoint) ret[m] = ret[0]; return ret; } } class Point { long x, y; Point(long x, long y) { this.x = x; this.y = y; } public String toString() { return String.format("(%d,%d)", x, y); } } private void work() throws IOException { Scanner sc = new Scanner(new BufferedReader(new InputStreamReader( System.in), 1 << 16)); Geometry g = new Geometry(); int tc = 1; while (true) { int n = sc.nextInt(); if (n == 0) break; Point[] p = new Point[n]; for (int i = 0; i < n; i++) { int x = sc.nextInt(); int y = sc.nextInt(); p[i] = new Point(x, y); } Point[] hull = g.grahamScan(p, true); double res = Double.POSITIVE_INFINITY; for (int i = 0; i < hull.length - 1; i++) { long max = 0; long a = hull[i + 1].y - hull[i].y; long b = hull[i].x - hull[i + 1].x; long c = -(a * hull[i].x + b * hull[i].y); double d = Math.hypot(a, b); for (int j = 0; j < hull.length - 2; j++) { int k = (i + 2 + j) % hull.length; long dist = Math.abs(a * hull[k].x + b * hull[k].y + c); if (dist > max) max = dist; } if (max / d < res) res = max / d; } System.out.printf("Case %d: %.2f\n", tc++, Math.ceil(100 * res) / 100.0); } System.out.close(); } public static void main(String[] args) throws IOException { new K().work(); } }