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