#include <bits/stdc++.h>
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  int len = a + b + 1;
  char s[a + b + 10];
  scanf("%s", s);
  if (strlen(s) != a + b + 1) {
    printf("No\n");
    return 0;
  } else if (s[a] != '-') {
    printf("No\n");
    return 0;
  }
  for (int i = 0; i < len + 5; i++) {
    if (s[a] == '-') {
      continue;
    } else if (s[i] == '0' || s[i] == '1' || s[i] == '2' || s[i] == '3' ||
               s[i] == '4' || s[i] == '5' || s[i] == '6' || s[i] == '7' ||
               s[i] == '8' || s[i] == '9') {
      continue;
    } else {
      printf("No\n");
      printf("3\n");
      return 0;
    }
  }
  printf("Yes\n");
  return 0;
}
