#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  int x, y;
  int cnt = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-') {
      x = cnt;
      y = s.size() - cnt - 1;
    }
    cnt++;
  }
  if (a == x && b == y)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
