($\//=$p=<>)*=--$_?$p*($p*--$_+2):1for glob<>;print