#include <bits/stdc++.h>
using namespace std;
const int N = 1610;
int mod = 1000000007;
char s[N];
int main() {
  int a, b;
  while (~scanf("%d%d", &a, &b)) {
    scanf("%s", s + 1);
    bool f = true;
    if (s[a + 1] != '-') f = false;
    int l = a + b + 1;
    for (int i = 1; i <= l; i++)
      if (i != a + 1 && !isdigit(s[i])) {
        f = false;
      }
    if (strlen(s) != a + 1 + b) f = false;
    puts(f ? "Yes" : "No");
  }
  return 0;
}
