#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long int a, b;
  cin >> a >> b;
  string s;
  cin >> s;
  if (s.size() != a + b + 1)
    puts("No");
  else if (s.find('-') == a && (s.size() - s.find('-') - 1) == b)
    puts("Yes");
  else
    puts("No");
}
