a = input() print( "YNeos"[ ( len(a) % 2 != 1 or a[::2].count(" ") or 2 * len(a.replace(" ", "")) - 1 == len(a) ) :: 2 ] )