#include <bits/stdc++.h>
using namespace std;
bool sort_by(pair<int, int> c, pair<int, int> d) { return c.second < d.second; }
bool check(int j, string s1) {
  if (s1[j] == '-')
    return true;
  else
    return false;
}
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  for (int i = 0; i < a + b + 1; i++) {
    if (i < a || i > a + 1) {
      if (s[i] == '-') {
        cout << "No";
        exit(0);
      }
    } else {
      if (s[i] != '-') {
        cout << "No";
        exit(0);
      }
    }
  }
  cout << "Yes";
}
