import random

GENDERS = 'boy girl'.split()
DAYS = 'mon tue wed thu fri sat sun'.split()

def birth(): # The miracle of life!
	return random.choice(GENDERS), random.choice(DAYS)

def special(c):
	return c[0] == 'boy' and c[1] == 'tue'

boy_pair = 0
misc_pair =0 
for _ in xrange(1000000):
	c1, c2 = birth(), birth() # A guy gets two kids
	if special(c1) or special(c2): # Hey, random dude, is any of your children special?
		if c1[0] == 'boy' and c2[0] == 'boy':
			boy_pair += 1
		else:
			misc_pair += 1

print boy_pair, misc_pair, boy_pair + misc_pair, float(boy_pair) / (boy_pair + misc_pair)
print 13.0/27