import java.io.*; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { int n = sc.nextInt(); char[] s = sc.next().toCharArray(); int a = 0, b = 0; for (char c : s) { if (c == '(') a++; else b++; } out.println((n % 2 == 0 && a == b) ? "Yes" : "No"); out.close(); } static Kattio sc = new Kattio(); static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); static class Kattio { static BufferedReader r; static StringTokenizer st; public Kattio() { r = new BufferedReader(new InputStreamReader(System.in)); } public String next() { try { while (st == null || !st.hasMoreTokens()) { st = new StringTokenizer(r.readLine()); } return st.nextToken(); } catch (Exception e) { return null; } } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } } }