#define _CRT_SECURE_NO_WARNINGS
//#define _USE_MATH_DEFINES
#include<stdio.h>
//#include<stdlib.h>
//#include<math.h>
//#include<string.h>
//#include<time.h>
//#include<ctype.h>
//#define pi acos(-1.0)
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
#define S(type,x) fscanf(stdin,"%"#type,&x)
#define max(a,b) a>b?a:b
int main() {
	int n, w;
	double ans;
	for (; ~fscanf(stdin, "%d%d", &n, &w), n, w; P(lf, ans + 0.01)) {
		int a[100] = {},
			s = 0,
			h = 0;
		ans = 0;
		while (n--) {
			int b;
			S(d, b);
			a[b / w]++;
			s = max(s, b / w);
			h = max(h, a[b / w]);
		}
		int i;
		for (i = 0; i <= s; i++) ans += (double)a[i] / h*(s - i) / s;
	}
	return 0;
}