M=new Map,D=$`body`.innerText.trim().split`\n`,D.forEach(d=>{[c,r]=d.split(" bags contain "),b="no other bags."==r?[]:r.split(", ").map(d=>([,q,C]=/(\d+) (.+) bags?\.?/.exec(d),{q:1*q,c:C})),M.set(c,b)}),G="shiny gold",W=new Set,M.forEach((d,a)=>{d.some(d=>d.c===G)&&W.add(a)});for(let d;d!==W.size;)d=W.size,M.forEach((d,a)=>W.has(a)||d.some(d=>W.has(d.c))&&W.add(a));count=d=>0===M.get(d).length?1:M.get(d).reduce((d,a)=>d+a.q*count(a.c),1);[W.size,count(G)-1]