// 2019 IUSB Programming Competition // Round 1 Problem 4 // Find out if the open and closed parentheses in a string are properly matching // Solution by Liguo Yu import java.util.Scanner; public class round1_p4 { public static void main(String[] main) { boolean balanced = true; Scanner scan = new Scanner(System.in); String string = scan.nextLine(); int x = 0; for (int i = 0; i < string.length(); i++) { if (string.charAt(i) == '(') x++; else if (string.charAt(i) == ')') x--; if (x < 0) balanced = false; } if (x != 0) balanced = false; if(balanced == true) System.out.println("yes"); else System.out.println("no"); return; } }