#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b;
  string s;
  scanf("%lld %lld", &a, &b);
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-' && i != a) {
      printf("No\n");
      return 0;
    }
  }
  if (s.size() != (a + b + 1) || s[a] != '-') {
    printf("No\n");
    return 0;
  }
  printf("Yes\n");
  return 0;
}
