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