require 'prime'

def (n)
  return 1 if self == 1
  pd = n.prime_division
  return 0 unless pd.map(&:last).all?(1)
  pd.size.even?? 1: -1
end

def M(n)
  (1..n).sum{|n| (n)}
end

([] + (1..199).map{|n| % M(n)}).each_slice(20){|line| puts line.join() }

ar = (1..1000).map{|n| M(n)}
puts 
puts