#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const string alp = "abcdefghijklmnopqrstuvwxyz";
const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
bool isprime(int p) {
  if (p == 1) return false;
  for (int i = (2); i < (p); ++i) {
    if (p % i == 0) return false;
  }
  return true;
}
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  for (int i = (0); i < (s.length()); ++i) {
    if (i == a + 1) {
      if (s[i] != '-') {
        puts("No");
        return 0;
      }
    } else {
      if (s[i] == '-') {
        puts("No");
        return 0;
      }
    }
  }
  puts("Yes");
  return 0;
}
