# Arup Guha
# 3/1/2021
# Solution to Kattis Problem: Beehives
# https://open.kattis.com/problems/beehives

import math

# Get basic input.
line = input("").split()
d = float(line[0])
n = int(line[1])

# Process cases.
while abs(d) > 1e-9 or n != 0:

    # Get points.
    pts = []
    for i in range(n):
        line = input("").split()
        pts.append([float(line[0]), float(line[1])])

    # Accumulators.
    sour = 0
    sweet = 0

    # Looking at item i.
    for i in range(n):

        # We assume it's sweet until we find something too close.
        isSweet = True
        for j in range(n):

            # This doesn't count.
            if i == j:
                continue

            # Get distance squared between here and the other hive.
            dist = math.sqrt( (pts[i][0]-pts[j][0])**2 + (pts[i][1]-pts[j][1])**2 ) 

            # This is the comparison we want.
            if dist <= d+1e-12:
                isSweet = False
                break

        # Update the appropriate counter.
        if isSweet:
            sweet += 1
        else:
            sour += 1

    # Output for the case.
    print(sour,"sour,",sweet,"sweet")

    # Get next case.
    line = input("").split()
    d = float(line[0])
    n = int(line[1])
