#include <bits/stdc++.h>
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
using namespace std;
using ll = long long;
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  int cnt1 = 0, cnt2 = 0;
  int h_cnt = 0;
  for (int i = 0; i < (int)(s.size()); i++) {
    cnt1++;
    if (s[i] == '-') {
      h_cnt++;
      if (h_cnt > 0) {
        cout << "No" << endl;
        ;
        return 0;
      }
      swap(cnt1, cnt2);
    }
  }
  if (a == (cnt2 - 1) && b == cnt1) {
    cout << "Yes" << endl;
    ;
  } else
    cout << "No" << endl;
  ;
}
