local mmi, mma = math.min, math.max
local n = io.read("*n", "*l")
local up, down = {}, {}
for i = 1, n do
  local s = io.read()
  local cur = 0
  local min = 0
  for j = 1, #s do
    if s:sub(j, j) == "(" then
      cur = cur + 1
    else
      cur = cur - 1
    end
    min = mmi(min, cur)
  end
  local dec = -min
  if 0 <= cur then
    table.insert(up, {dec, cur})
  else
    table.insert(down, {dec, cur})
  end
end

local function sort1(a, b)
  return a[1] < b[1]
end
local function sort2(a, b)
  return a[1] > b[1]
end
table.sort(up, sort1)
table.sort(down, sort2)
local cur = 0
local valid = true
for i = 1, n do
  local dec, tot = 0, 0
  if i <= #up then
    dec, tot = up[i][1], up[i][2]
  else
    local p = i - #up
    dec, tot = down[p][1], down[p][2]
  end
  if cur - dec < 0 then
    valid = false
    break
  end
  cur = cur + tot
  if cur < 0 then valid = false break end
end
if valid then
  valid = cur == 0
end
-- valid = valid and cur == 0
print(valid and "Yes" or "No")
