#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  int w = 0;
  int q = 0;
  for (int i = (0); i < (s.size()); i++) {
    string h;
    h = s[i];
    if (h == "-") {
      w = i + 1;
      break;
    }
    q++;
  }
  if (q != a) {
    cout << "No\n";
    return 0;
  }
  q = 0;
  for (int i = (w); i < (s.size()); i++) {
    q++;
  }
  if (q != b) {
    cout << "No\n";
    return 0;
  }
  cout << "Yes\n";
  return 0;
}
