P  — Galactic Bonding

Time Limit: 2 sec
Memory Limit: 32 MB

Calvin likes to lie in a field and look at the night sky. Since he doesn’t know any real star constellations, he makes them up: if two stars are close to each other, they must belong to the same constellation. He wants to name them all, but fears to run out of names. Can you help him and count how many constellations there are in the sky?

Two stars belong to the same constellation if distance between their projections on a two-dimensional sky plane isn’t more than D units.

INPUT

There is a number of tests T (T ≤ 50) on the first line. Each test case contains the number of stars N (0 ≤ N ≤ 1000) a real distance D (0.00 ≤ D ≤ 1000.00). Next N lines have a pair of real coordinates X Y (−1000.00 ≤ X, Y ≤ 1000.00) for each star. Real numbers in the input will have at most 2 digits after a decimal point.

OUTPUT

For each test case output a single line "Case T: N". Where T is the test case number (starting from 1) and N is the number of constellations.

SAMPLE INPUT

2
5 1.5
1.0 0.1
2.0 0.0
5.0 0.2
6.0 0.4
3.0 -0.1
3 4.0
121.12 254.06
645.04 301.85
912.49 568.96

SAMPLE OUTPUT

Case 1: 2
Case 2: 3

Problem by: Aleksej Viktorchik; Leonid Sislo; Andrius Mitkus
Huge Easy Contest #2