fn solve(ss: Vec<(i32, i32)>) -> bool {
    let mut pos: Vec<_> = ss.iter().filter(|s| s.0 < s.1).collect();
    let mut neg: Vec<_> = ss.iter().filter(|s| s.0 >= s.1).collect();
    pos.sort_by(|a, b|{
        a.0.cmp(&b.0)
    });
    //dbg!(&pos);
    neg.sort_by(|a, b|{
        b.1.cmp(&a.1)
    });
    //dbg!(&neg);
    let mut sum = 0;
    for s in pos.iter().chain(neg.iter()) {
        sum -= s.0;
        if sum < 0 {
            return false;
        }
        sum += s.1;
        if sum < 0 {
            return false;
        }
    }
    if sum != 0 {
        return false;
    }
    true
}

fn main() {
    let mut io = IO::new();

    let n = io.read();
    let mut ss = Vec::new();

    for _ in 1..=n {
        let mut left = 0;
        let mut right = 0;

        loop {
            match io.read_raw_ascii() {
                b'(' => right += 1,
                b')' => if right > 0 { right -= 1 } else { left +=1 },
                b'\n' => break,
                _ => panic!(),
            }
        }
        ss.push((left, right));
    }

    let ans = solve(ss);

    io.writeln(if ans { "Yes" } else { "No" });
}
 


// PROCON LIBRARY //

pub trait Num: Sized {
    fn to_i(self) -> isize;
    fn to_u(self) -> usize { self.to_i() as usize }
    fn off<T: Num>(self, other: T) -> usize { (self.to_i() + other.to_i()).to_u() }
}
impl Num for usize { fn to_i(self) -> isize { self as isize } }
impl Num for isize { fn to_i(self) -> isize { self as isize } }
impl Num for u32 { fn to_i(self) -> isize { self as isize } }
impl Num for i32 { fn to_i(self) -> isize { self as isize } }
impl Num for u64 { fn to_i(self) -> isize { self as isize } }
impl Num for i64 { fn to_i(self) -> isize { self as isize } }

pub struct IdxIterMut<'a, T> {
    iter: std::iter::Enumerate<std::slice::IterMut<'a, T>>,
}

impl<'a, T> Iterator for IdxIterMut<'a, T> {
    type Item=(usize, &'a mut T);
    fn next(&mut self) -> Option<(usize, &'a mut T)> {
        self.iter.next().map(|(i, v)| (i+1, v))
    }
}

pub struct IdxIter<'a, T> {
    iter: std::iter::Enumerate<std::slice::Iter<'a, T>>,
}

impl<'a, T> Iterator for IdxIter<'a, T> {
    type Item=(usize, &'a T);
    fn next(&mut self) -> Option<(usize, &'a T)> {
        self.iter.next().map(|(i, v)| (i+1, v))
    }
}

pub trait SliceExt<T> {
    fn at<I: Num>(&mut self, i: I) -> &mut T;
    fn iter_idx(&self) -> IdxIter<'_, T>;
    fn iter_idx_mut(&mut self) -> IdxIterMut<'_, T>;
}
impl<T> SliceExt<T> for [T] {
    fn at<I: Num>(&mut self, i: I) -> &mut T {
        &mut self[i.to_u() + 1]
    }
    fn iter_idx(&self) -> IdxIter<'_, T> {
        IdxIter {
            iter: self.iter().enumerate(),
        }
    }
    fn iter_idx_mut(&mut self) -> IdxIterMut<'_, T> {
        IdxIterMut {
            iter: self.iter_mut().enumerate(),
        }
    }
}

pub fn gen<T, F: FnMut() -> T>(n: usize, mut f: F) -> impl Iterator<Item=T> {
    (0..n).map(move |_| f())
}

pub struct IO(
    std::io::BufReader<std::io::StdinLock<'static>>,
    std::io::BufWriter<std::io::StdoutLock<'static>>
);
 
impl IO {
    pub fn new() -> IO {
        IO(
            std::io::BufReader::new(Box::leak(Box::new(std::io::stdin())).lock()),
            std::io::BufWriter::new(Box::leak(Box::new(std::io::stdout())).lock())
        )
    }
    pub fn write<D: std::fmt::Display>(&mut self, v: D) {
        use std::io::Write;
        write!(self.1, "{}", v).unwrap();
    }
    pub fn writeln<D: std::fmt::Display>(&mut self, v: D) {
        use std::io::Write;
        writeln!(self.1, "{}", v).unwrap();
    }
    pub fn write_many<D: std::fmt::Display>(&mut self, vs: impl std::iter::IntoIterator<Item=D>) {
        for v in vs {
            self.writeln(v);
        }
    }
    pub fn read<T: std::str::FromStr>(&mut self) -> T {
        use std::io::Read;
        let buf = self
            .0
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r' || b == b'\t')
            .take_while(|&b| b != b' ' && b != b'\n' && b != b'\r' && b != b'\t')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn read_ascii(&mut self) -> u8 {
        use std::io::Read;
        self
            .0
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r' || b == b'\t')
            .next()
            .expect("Parse error")
    }
    pub fn read_raw_ascii(&mut self) -> u8 {
        use std::io::Read;
        self
            .0
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .next()
            .expect("Parse error")
    }
    pub fn vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }
    pub fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
    pub fn pairs<T: std::str::FromStr>(&mut self, n: usize) -> Vec<(T, T)> {
        (0..n).map(|_| (self.read(), self.read())).collect()
    }
}


Measured memory_bytes: 17716