$_=<>;$_=`factor $_`;print / 2 2\b/?4:/: (2 )*\K\d+/*$&