#include <bits/stdc++.h>
int main(void) {
  int a, b;
  char num[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
  scanf("%d %d", &a, &b);
  char s[128];
  scanf("%s", s);
  for (int i = 0; i < a; i++) {
    int flag = 0;
    for (int i = 0; i < 9; i++) {
      if (s[i] == num[i]) {
        flag = 1;
      }
    }
    if (flag == 1) {
      puts("No");
      return 0;
    }
  }
  if (s[3] != '-') {
    puts("No");
    return 0;
  }
  for (int i = a + 1; i < a + b + 1; i++) {
    int flag = 0;
    for (int i = 0; i < 9; i++) {
      if (s[i] == num[i]) {
        flag = 1;
      }
    }
    if (flag == 1) {
      puts("No");
      return 0;
    }
  }
  puts("Yes");
  return 0;
}
