p 3.times.map{16-gets.sub("NONE\n","").split(?,).size}.inject(:*)**2