input = 10
duration = 10*60 #in seconds

previous = input
def random():
    global previous
    previous = (137*previous+187)%256
    return previous

direction = 0 #0=Nord, 1=Est
n = 0
e = 0

r = input
for i in range(0, duration, 3):
    if r%10==0:
        n+=1
        direction = 0
    elif r%10==1:
        e+=1
        direction = 1
    else:
        if direction%2 == 0:
            n+=1
        else:
            e+=1
    r = random()

print(n,",", e)

