#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  while (~scanf("%d%d", &a, &b)) {
    char in[100];
    bool flag = 0;
    scanf("%s", in);
    if (in[a] != '-') {
      puts("No");
      continue;
    }
    for (int i = 0; i < a; i++)
      if (in[i] < '0' || in[i] > '9') {
        puts("No");
        flag = 1;
        break;
      }
    for (int i = a + 1; i < a + b; i++)
      if (in[i] < '0' || in[i] > '9') {
        puts("No");
        flag = 1;
        break;
      }
    if (!flag) puts("Yes");
  }
}
