#include <math.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct point
{
float x;
float y;
}Point;
float randFloat()
{
return 1.0*rand()/RAND_MAX;
}
float distance(Point a,Point b)
{
return sqrt((a.x - b.x)*(a.x - b.x) + (a.y - b.y)*(a.y - b.y));
}
int main()
{
float d;
int n;
int i,j;
int cnt = 0;
scanf("%f%d",&d,&n);
printf("%d\n",n);
Point *a =(Point *)malloc(n*sizeof(Point));
for(i = 0;i < n;i++)
{
a[i].x = randFloat();
a[i].y = randFloat();
}
for(i = 0;i < n;i++)
{
for(j = i+1;j < n;j++)
{
if(distance(a[i],a[j]) < d)
cnt++;
}
}
printf("%d edges shorter than %f\n",cnt,d);
}