#include <bits/stdc++.h>
int main() {
  int a, b, f = 0, i;
  scanf("%d %d", &a, &b);
  char str[a + b + 2];
  scanf("%s", str);
  int counthyp = 0;
  for (i = 0; i < strlen(str); i++) {
    int numtest = str[i] - '0';
    int hyphentest = str[i] - '-';
    int hyphencheck = str[a] - '-' + 2;
    if (hyphencheck == 2) {
      f = 1;
      counthyp++;
      if (counthyp == 1 && i == a)
        f = 1;
      else
        f = 0;
      ;
    }
    if (numtest >= 0 && numtest <= 9) {
      f = 1;
    }
  }
  if (counthyp != 1) f = 0;
  if (f)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
