#include <bits/stdc++.h>
int main() {
  char s[23];
  int a, b;
  scanf("%d%d%s", &a, &b, s);
  if (strchr(strchr(s, '-') + 1, '-') == NULL) {
    int l = strlen(s);
    int A = 0;
    for (int i = 0; i < l; i++)
      if (s[i] == '-')
        break;
      else
        A++;
    if (A == a && l == 1 + A + b) {
      printf("Yes\n");
      return 0;
    }
  }
  printf("No\n");
}
