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