#include <bits/stdc++.h>
int main() {
  int a, b;
  char s[1000005];
  while (scanf("%d%d", &a, &b) != EOF) {
    scanf("%s", s);
    int len = strlen(s);
    if (len != (a + b + 1))
      printf("No\n");
    else {
      if (s[a] != '-')
        printf("No\n");
      else
        printf("Yes\n");
    }
  }
  return 0;
}
