#include <bits/stdc++.h>
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  char input[a + b + 2];
  scanf("%s", input);
  int len = strlen(input);
  int flag = 1, count = 0;
  for (int i = 0; i < len; i++) {
    if (input[a] != '-') {
      flag = 0;
      break;
    }
    if (input[i] >= '0' && input[i] <= '9') {
      count++;
    }
  }
  (count == a + b) ? flag = 1 : flag = 0;
  (flag == 0) ? printf("No\n") : printf("Yes\n");
  return 0;
}
