require'prime' d=0,*[-1]*n=gets.to_i Prime.each(n){|p|n.downto(p){|i|t=d[i-p]+1;t>0&&d[i]