#include <bits/stdc++.h>
int main() {
  int A, B;
  scanf("%d %d", &A, &B);
  char buf[16];
  scanf("%s", buf);
  std::string S = buf;
  for (int i = 0; i < A; ++i)
    if (!isdigit(S[i])) return !printf("No\n");
  if (S[A] != '-') return !printf("No\n");
  for (int i = A + 1; i < B; ++i)
    if (!isdigit(S[i])) return !printf("No\n");
  printf("Yes\n");
}
