import fileinput
import yaml

cyaml = ''
t = 0
f = 0
e = 0
a = 0
y = 0

for line in fileinput.input():
    if '#####' in line:
        a += 1
        if cyaml:
            try:
                conf = yaml.safe_load(cyaml)
                y += 1 
            except:
                e += 1
#                continue

            if conf:
                try:
                    res = conf['pandora']['enabled']
                    if res == True:
                        t += 1
                    elif res == False:
                        f += 1
                except:
                   pass 


        str = line.split('|')
        cyaml = str[1]
    else:
            cyaml += line

print 'All:{}, Pandora true:{}, Pandora false:{}, Yaml:{}, INI:{}'.format(a, t, f, y, e)
