#include <bits/stdc++.h>
using namespace std;
char buf[100100];
int main() {
  gets(buf);
  int n = strlen(buf);
  while (n > 0 && (buf[n - 1] == '\r' || buf[n - 1] == '\n')) buf[--n] = 0;
  list<char> lst(buf, buf + n);
  auto cur = lst.begin();
  while (true) {
    if (cur == lst.end()) break;
    auto next = cur;
    ++next;
    if (next == lst.end()) break;
    if (*cur != *next) {
      cur = next;
      continue;
    }
    list<char>::iterator nextcur = lst.end();
    if (cur != lst.begin()) {
      nextcur = cur;
      --nextcur;
    } else {
      nextcur = next;
      ++nextcur;
    }
    lst.erase(cur);
    lst.erase(next);
    cur = nextcur;
  }
  if (lst.empty())
    puts("Yes");
  else
    puts("No");
  return 0;
}
