Twinkle Twinkle Little Star

Time Limit: 3000 ms

Memory Limit: 65536 ms

Description

Twinkle, twinkle, little star, how I wonder what you are. Up above the world so high, like a diamond in the sky. Twinkle, twinkle, little star, how I wonder what you are. When the blazing sun is gone, when he nothing shines upon. The you show your little light, Twinkle, twinkle, little star Twinkle, twinkle, little star, How I wonder what you are. Twinkle, twinkle, little star, how I wonder what you are. ---- Well, this song may take us back to our childhood. When we were young, we often looked up at the stars. How amazing they were! But, unfortunately, as we are becoming older and older, what used to be interesting can not interest us now. So what we can do is to find something more interesting! Here is one, maybe. Assume that all the stars are so far from us that we can treat them as points in a plane. You are given N stars in the plane, and a number K (0≤K≤N). What you need to do is to find the minimum square covering at least K stars, whose edges are all parallel to the axis. The stars which are on the edges of the square are also covered.

Input

The input will consist of multiple cases. Your program should process to the end of the input file.In the first line of one case, there are two integer N and K, 0

Output

The output will consist of one line for each case, in the format of “Case X: Y”, while X is the case number counting from 1, and Y is the edge length of the minimum square. X and Y are all integers.

Sample Input

4 4
0 0
0 1
1 0
2 2
4 2
0 0
1 1
2 2
3 3

Sample Output

Case 1: 2
Case 2: 1

Hint

Source

3rd Central South China Programming Contest

提交代码