#include <bits/stdc++.h>
using namespace std;
const int NMAX = 100000;
int main() {
  string s;
  cin >> s;
  int mid = -1, cnt = 0, hyp = 0;
  int aa = 0, bb = 0;
  for (int i = 0; i < s.size(); ++i) {
    char ch = s[i];
    if ('0' <= ch && ch <= '9')
      ++cnt;
    else if (ch == '-')
      ++hyp, mid = i;
    else {
      cout << "No\n";
      return 0;
    }
  }
  if (hyp == 1 && cnt == s.size() - 1 && mid > 0 && mid < s.size() - 1) {
    cout << "Yes\n";
  } else
    cout << "No\n";
  return 0;
}
