n,d,k=gets.split.map(&:to_i) p=(1..n).map{|i|gets.to_i} t=Array.new(n){Array.new(n,0)} m=b=s=0 (0..n-=1).map{|i|(0..n).map{|j|(c=i0)?(a=t[i][j]=r;(a>m ?(m=a;b=i;s=j):0)):0}} puts "#{m*k}"+(m>0?"\n#{b} #{s}":"")