# Path: tryalgo/our_std.py
# def readarray(typ):
#     """
#     function to read an array
#     """
#     return list(map(typ, stdin.readline().split()))


from sys import stdin
from math import sqrt
from tryalgo.our_std import readarray
            last = right            # put an antenna
    return sol


# snip{
def interval_cover(I):
    """Minimum interval cover

    :param I: list of closed intervals
    :returns: minimum list of points covering all intervals
    :complexity: O(n log n)
    """
    S = []
    # sort by right endpoints
    for start, end in sorted(I, key=lambda v: v[1]):
        if not S or S[-1] < start:
            S.append(end)
    return S
# snip}


if __name__ == "__main__":
    # http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1360
    testCase = 1
    while True:
        n, rayon = readarray(int)   # n=#islands, d=radius
        if n == 0:
            break            # end of instances
        iles = []
        for _ in range(n):

# Path: tryalgo/our_std.py
# def readarray(typ):
#     """
#     function to read an array
#     """
#     return list(map(typ, stdin.readline().split()))


# Path: tryalgo/interval_cover.py
from sys import stdin
from math import sqrt
from tryalgo.our_std import readarray

            last = right            # put an antenna
    return sol


# snip{
def interval_cover(I):
    """Minimum interval cover

    :param I: list of closed intervals
    :returns: minimum list of points covering all intervals
    :complexity: O(n log n)
    """
    S = []
    # sort by right endpoints
    for start, end in sorted(I, key=lambda v: v[1]):
        if not S or S[-1] < start:
            S.append(end)
    return S
# snip}


if __name__ == "__main__":
    # http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1360
    testCase = 1
    while True:
        n, rayon = readarray(int)   # n=#islands, d=radius
        if n == 0:
            break            # end of instances
        iles = []
        for _ in range(n):

            x, y = readarray(int)