n = gets.to_i
a = (1..n).map { gets.chomp }

diff = []
min = [0] * n
diff_rev = []
min_rev = [0] * n
a.each_with_index do |s, i|
    x = 0
    s.each_char do |c|
        x += (c == ?( ? 1 : -1)
        min[i] = x if x < min[i]
    end
    diff[i] = x
    x = 0
    s.reverse.each_char do |c|
        x += (c == ?) ? 1 : -1)
        min_rev[i] = x if x < min_rev[i]
    end
    diff_rev[i] = x
end

if min.max < 0 || min_rev.max < 0 || diff.inject(:+) != 0
    puts 'No'
    exit
end

rest = (0..n-1).to_a

h = 0
while rest.map {|i| diff[i]}.max >= 0
    i = rest.select {|i| h + min[i] >= 0}.max_by {|i| diff[i]}
    if !i
        puts 'No'
        exit
    else
        h += diff[i]
        rest.delete(i)
    end
end

h = 0
until rest.empty?
    i = rest.select {|i| h + min_rev[i] >= 0}.max_by {|i| diff_rev[i]}
    if !i
        puts 'No'
        exit
    end
    h += diff_rev[i]
    rest.delete(i)
end

puts 'Yes'