n = gets.to_i
c = Hash.new(0)
n.times do
    x, y, w = gets.split.map(&:to_i)
    c[[x,y]] = w
end
max = 0
c.each do |k,v|
    sum = v + c[[k[0]+1, k[1]]] + c[[k[0], k[1]+1]] + c[[k[0]+1, k[1]+1]]
    max = sum if sum > max
end
puts "#{max} / 1"