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