#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  char s[100];
  scanf("%d %d", a, b);
  scanf("%s", s);
  bool judge = true;
  int i = 0;
  for (i = 0; i < a; i++) {
    if (s[i] == '-') {
      judge = false;
    }
  }
  if (s[a] != '-') {
    judge = false;
  }
  for (i = a + 1; i < a + b + 1; i++) {
    if (s[i] == '-') {
      judge = false;
    }
  }
  if (s[i] != '\0') judge = false;
  if (judge)
    printf("Yes\n");
  else
    printf("No\n");
}
