#include <bits/stdc++.h>
int main() {
  int a, b;
  int flag = 0;
  scanf("%d %d", &a, &b);
  char input[a + b + 1];
  scanf("%s", input);
  int ctr = 0;
  for (int i = 0; i < a + b + 1; i++) {
    if (input[i] == '-' && i == 3) {
      flag = 1;
    } else if (input[i] >= '0' && input[i] <= '9') {
      ++ctr;
    }
  }
  int ans = a + b;
  if (flag == 1 && ctr == ans) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}
